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

:root {
  --bg: #f4f1eb;
  --card: #fcfbf8;
  --ink: #2a2926;
  --muted: #534f49;
  --soft: #7a756c;
  --line: #e2ddd4;
  --accent: #3d4a3b;
  --accent-soft: #e4e9e0;
  --accent-hover: #2f3a2e;
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 2rem;
  background: rgba(244, 241, 235, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink);
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 1.35rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

nav a:hover,
nav a:focus-visible {
  color: var(--accent);
}

nav a.nav-cta {
  padding: 0.4rem 0.9rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
}

nav a.nav-cta:hover,
nav a.nav-cta:focus-visible {
  background: var(--accent-hover);
  color: #fff;
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.5vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.section-intro {
  color: var(--muted);
  margin: -0.75rem 0 1.5rem;
  max-width: 36rem;
}

/* Hero / profile card */
.hero {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
  border-bottom: none;
}

.profile-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 3rem 3.25rem;
}

.eyebrow {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.1rem;
}

.headline {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 400;
  line-height: 1.45;
  max-width: 36rem;
  color: var(--ink);
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 34rem;
  margin-top: 0.9rem;
}

.btn {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.8rem 1.45rem;
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  text-decoration: none;
  width: max-content;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.profile-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 12.5rem;
}

.portrait {
  width: 11.5rem;
  height: 11.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid #c9d0c3;
  overflow: hidden;
}

.portrait picture,
.portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.monogram {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.portrait-caption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--soft);
}

.location {
  margin-top: 0.15rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

/* What I do */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.6rem 1.7rem 1.7rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  border-color: #cfc9be;
  box-shadow: 0 1px 0 rgba(42, 41, 38, 0.04);
}

.service-card h3 {
  margin-bottom: 0.6rem;
}

.service-card p {
  color: var(--muted);
  font-size: 1rem;
}

/* Topics */
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chips li {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Clients */
.client-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 2.25rem;
}

.client-list li {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  padding: 0.15rem 0;
}

/* Writing */
.writing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.15rem;
}

.writing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.45rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color 0.2s ease;
}

.writing-card:hover {
  border-color: #cfc9be;
}

.card-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--soft);
  margin: 0;
  padding: 0;
}

.writing-card h3 {
  color: var(--ink);
  font-weight: 500;
  font-style: normal;
  font-size: 1.15rem;
}

.writing-card p {
  color: var(--muted);
  font-size: 0.98rem;
  flex: 1;
}

.writing-card a {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

.writing-card a:hover,
.writing-card a:focus-visible {
  text-decoration: underline;
}

/* Published work */
.published-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 3.25rem 0 0.75rem;
}

.published-intro {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.published-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.published-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.published-card:hover {
  border-color: #cfc9be;
}

.published-thumb {
  display: block;
  background: var(--accent-soft);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.published-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.published-body {
  padding: 1.2rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.published-card h3 {
  color: var(--ink);
  font-weight: 500;
  font-style: normal;
  font-size: 1.15rem;
  line-height: 1.35;
}

.published-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.published-card h3 a:hover,
.published-card h3 a:focus-visible {
  text-decoration: underline;
}

.published-card .excerpt {
  color: var(--muted);
  font-size: 0.98rem;
  flex: 1;
}

.published-card .read-on {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

.published-card .read-on:hover,
.published-card .read-on:focus-visible {
  text-decoration: underline;
}

.contact-elsewhere {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin-top: 0.7rem;
}

/* Experience */

#experience {
  padding-top: 3.5rem;
}

.experience-list {
  list-style: none;
}

.experience-list > li {
  padding: 1.85rem 0;
  border-top: 1px solid var(--line);
}

.experience-list > li:first-child {
  border-top: none;
  padding-top: 0;
}

.exp-role {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.exp-meta {
  color: var(--soft);
  font-size: 0.95rem;
  margin: 0.2rem 0 0.55rem;
}

.experience-list > li > p:not(.exp-role):not(.exp-meta) {
  color: var(--muted);
  max-width: 42rem;
}

.exp-engagements {
  list-style: none;
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.exp-engagements li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.25rem 1.25rem;
}

.exp-engagements li:first-child {
  grid-column: 1 / -1;
}

.exp-client {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.exp-engagements p:not(.exp-client) {
  color: var(--muted);
  font-size: 0.98rem;
}

/* Certificates */

.cert-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cert-grid li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.35rem 1.4rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cert-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.cert-issuer {
  color: var(--soft);
  font-size: 0.92rem;
}

.education-note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 38rem;
}

/* About */
.about-copy {
  max-width: 40rem;
}

.about-copy p + p {
  margin-top: 1rem;
}

.about-copy p {
  color: var(--muted);
  font-size: 1.1rem;
}

/* Form */
.contact-intro {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 36rem;
}

.enquiry-form {
  margin-top: 2rem;
  max-width: 36rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.form-row .field {
  margin-bottom: 1.1rem;
}

.field label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.req {
  color: var(--accent);
  font-weight: 700;
}

.optional {
  font-weight: 400;
  color: var(--soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid #d4cfc6;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23534f49' d='M1.2 1.2 6 6l4.8-4.8 1.2 1.2L6 8.4 0 2.4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px 8px;
  padding-right: 2.2rem;
}

.field textarea {
  resize: vertical;
  min-height: 8.5rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #8a3d35;
}

.captcha-field {
  margin-top: 0.25rem;
}

.captcha-label {
  display: block;
  font-size: 0.9rem;
  color: var(--soft);
  margin-bottom: 0.4rem;
}

.cf-turnstile {
  min-height: 65px;
  max-width: 420px;
  border-radius: 6px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  margin-top: 0.25rem;
}

.form-actions .btn {
  margin-top: 0;
}

.form-status {
  font-size: 0.95rem;
  color: var(--muted);
  flex: 1 1 16rem;
}

.form-status.is-success {
  color: #2f4a32;
}

.form-status.is-error {
  color: #8a3d35;
}

.form-status.is-pending {
  color: var(--muted);
}

.enquiry-form button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: default;
}

footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem;
  color: var(--soft);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
}

.footer-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .cert-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .profile-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.15rem 1.6rem 2.25rem;
    text-align: left;
  }

  .profile-aside {
    order: -1;
    align-items: flex-start;
    text-align: left;
  }

  .portrait {
    width: 7.5rem;
    height: 7.5rem;
  }

  .monogram {
    font-size: 2rem;
  }

  .service-grid,
  .writing-grid,
  .published-grid,
  .cert-grid,
  .exp-engagements {
    grid-template-columns: 1fr;
  }

}

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

@media (max-width: 600px) {
  .nav {
    padding: 0.8rem 1rem;
  }

  nav {
    gap: 0.3rem 0.7rem;
  }

  nav a {
    font-size: 0.86rem;
  }

  nav a.nav-cta {
    padding: 0.32rem 0.7rem;
    font-size: 0.82rem;
  }

  main {
    padding: 0 1.15rem;
  }

  section {
    padding: 3.25rem 0;
  }

  .hero {
    padding-top: 1.5rem;
    padding-bottom: 2.25rem;
  }

  footer {
    padding: 1.5rem 1.15rem 2rem;
  }
}

/* Article pages */
.article-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 2rem 4.5rem;
}

.article {
  max-width: 68ch;
  margin: 0 auto;
}

.back {
  margin-bottom: 1.75rem;
}

.back a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.back a:hover,
.back a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.article-header h1 {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  margin-bottom: 0.7rem;
}

.article-meta {
  color: var(--soft);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
}

.article-body p + p,
.article-body figure + p,
.article-body p + figure,
.article-body h2 + p,
.article-body blockquote + p,
.article-body p + blockquote,
.article-body p + h2,
.article-body figure + h2,
.article-body blockquote + h2 {
  margin-top: 1.15rem;
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.85rem;
  line-height: 1.35;
}

.article-body figure {
  margin: 1.6rem 0;
}

.article-body figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: var(--card);
}

.article-body figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--soft);
}

.article-body blockquote {
  margin: 1.4rem 0;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.55;
}

.article-body blockquote p + p {
  margin-top: 0.7rem;
}

@media (max-width: 600px) {
  .article-main {
    padding: 1.25rem 1.15rem 3.25rem;
  }
}
