/* ---------- Reset (Josh Comeau's modern CSS reset) ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body { -webkit-font-smoothing: antialiased; line-height: 1.5; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
#root, #__next { isolation: isolate; }

/* ---------- Self-hosted fonts ---------- */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --color-bg: #ffffff;
  --color-fg: #000000;
  --color-muted: #1b1b1b;
  --color-accent: #dbdbdb;
  --color-border: #dbdbdb;

  --font-display: "roc-grotesk", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body:    "roc-grotesk", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max-w: 1100px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 2rem;
  --space-4: 4rem;
  --space-5: 6rem;
  --bp-mobile: 768px;
}

/* ---------- Base ---------- */
body {
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: 1rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: var(--space-2); }

a {
  color: var(--color-fg);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:hover { text-decoration-thickness: 2px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-fg);
  color: var(--color-bg);
  padding: var(--space-1) var(--space-2);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-2);
}

.section {
  padding-block: var(--space-5);
}

/* ---------- Header ---------- */
.site-header {
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.site-header a {
  text-decoration: none;
  color: var(--color-fg);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--space-3);
  background: var(--color-fg);
  color: var(--color-bg);
  text-align: center;
  font-size: 0.875rem;
}
.site-footer p { margin-bottom: var(--space-1); }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer a { color: var(--color-accent); }

/* ---------- Hero ---------- */
.hero-inner h1 {
  max-width: 600px;
  margin-bottom: var(--space-2);
  white-space: pre-wrap;
}
.hero-inner p {
  max-width: 600px;
  font-size: 1.125rem;
  color: var(--color-muted);
  margin-bottom: var(--space-2);
}
.hero-inner p:last-child { margin-bottom: 0; }

/* ---------- Featured writing cards ---------- */
.featured h2 {
  margin-bottom: var(--space-3);
}
.cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.cards li { min-width: 0; }
.cards a {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.15s;
  height: 100%;
}
.cards a:hover {
  border-color: var(--color-muted);
}
.cards a img {
  width: 100%;
  height: auto;
  display: block;
}
.cards h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- Meet Mary ---------- */
.mary {
  background: var(--color-bg);
}
.mary-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
  position: relative;
}
.mary-inner::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(146, 199, 214, 0.25) 0%, rgba(220, 200, 240, 0.15) 50%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.mary-inner img {
  position: relative;
  z-index: 1;
}
.mary-text h2 {
  margin-bottom: var(--space-2);
}
.mary-text p {
  color: var(--color-muted);
}
.mary-text a {
  color: var(--color-fg);
  font-weight: 700;
}

/* ---------- Button ---------- */
a.btn {
  display: inline-block;
  background: var(--color-fg);
  color: var(--color-bg);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
}
a.btn:hover {
  background: var(--color-muted);
  text-decoration: none;
}
.mary-inner img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

@media (max-width: 768px) {
  .mary-inner { grid-template-columns: 1fr; }
}

/* ---------- Team ---------- */
.team h2 {
  margin-bottom: var(--space-3);
}
.team-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.team-grid li {
  text-align: center;
}
.team-grid img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin-inline: auto;
  margin-bottom: var(--space-1);
}
.team-grid h3 {
  margin-bottom: 0.15rem;
  font-size: 1rem;
  font-weight: 700;
}
.team-grid .role {
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.team-grid .bio {
  color: var(--color-muted);
  font-size: 0.875rem;
  margin: 0;
}

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

/* ---------- Contact ---------- */
.contact {
  background: var(--color-bg);
}
.contact .container {
  max-width: 700px;
  text-align: center;
}
.contact h2 {
  margin-bottom: var(--space-2);
}
.contact p {
  color: var(--color-muted);
}
.contact a {
  color: var(--color-fg);
  font-size: 1.125rem;
  font-weight: 700;
}

/* ---------- Post / Article ---------- */
.post .container {
  max-width: 720px;
}
.post h1 { margin-bottom: var(--space-1); }
.post-date {
  color: var(--color-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-3);
}
.post p, .post ul, .post ol, .post blockquote, .post figure {
  margin-bottom: var(--space-2);
}
.post h2 { margin-top: var(--space-3); margin-bottom: var(--space-1); }
.post h3 { margin-top: var(--space-2); margin-bottom: var(--space-1); }
.post blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: var(--space-2);
  color: var(--color-muted);
  font-style: italic;
}
.post img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-block: var(--space-2);
}
.post-back {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}
