*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #fff;
  --text: #111;
  --role: #8a7f72;
  --muted: #555;
  --line: #d8d4cf;
  --pill-bg: #ebe8e4;
  --pill-text: #6b6560;
  --focus: #2563eb;
  --hero-wash: #f7f5f2;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Outfit", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
  --mobile-nav-max: 52rem;
  --page-max: 1200px;
  --page-gutter: 1.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
a:focus { outline: none; }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
}
.skip-link:focus { left: 0; }

/* Header / nav */
.site-header {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1.25rem var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 0;
}
.site-logo-mark {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}
.site-logo-text { white-space: nowrap; }
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  min-width: 0;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  flex-wrap: wrap;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s var(--ease-out);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}
.site-nav-cta {
  color: var(--bg);
  background: var(--text);
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.site-nav-cta:hover {
  opacity: 0.9;
  color: var(--bg);
}
.site-nav-cta[aria-current="page"] {
  color: var(--bg);
  opacity: 0.88;
}
.site-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.site-nav-toggle:hover { border-color: var(--muted); }
.site-nav-toggle-bars,
.site-nav-toggle-bars::before,
.site-nav-toggle-bars::after {
  display: block;
  width: 1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}
.site-nav-toggle-bars::before,
.site-nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.site-nav-toggle-bars::before { top: -5px; }
.site-nav-toggle-bars::after { top: 5px; }
.site-header.is-nav-open .site-nav-toggle-bars { background: transparent; }
.site-header.is-nav-open .site-nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.site-header.is-nav-open .site-nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}
@media (max-width: 52rem) {
  .site-logo-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .site-nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--page-gutter) 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    z-index: 20;
  }
  .site-header.is-nav-open .site-nav { display: flex; }
  .site-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:last-child { border-bottom: none; }
}

.page {
  max-width: var(--page-max);
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 1.5rem var(--page-gutter) 4rem;
  overflow-x: clip;
}
.back {
  font-size: 0.875rem;
  margin-bottom: 2rem;
}
.back a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.next a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--pill-text);
}
footer a { color: var(--pill-text); }
.site-version {
  font-size: 0.75rem;
  color: var(--pill-text);
  letter-spacing: 0.02em;
}

/* Reveal utilities (only when JS is active) */
.js .reveal {
  opacity: 0;
  transform: translateY(1.1rem);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}
.js .reveal.is-inview,
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.22s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.34s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Shared card polish */
.work-card {
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}
.work-card a.website-link {
  transition: text-decoration-thickness 0.2s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .work-card:hover {
    transform: translateY(-3px);
  }
}

/* Homepage hero */
.home-hero-wrap {
  position: relative;
}
.home-hero-wrap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: min(72vh, 36rem);
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 55% at 85% 10%, rgba(138, 127, 114, 0.12), transparent 60%),
    radial-gradient(ellipse 70% 50% at 5% 40%, rgba(240, 238, 235, 0.9), transparent 55%),
    linear-gradient(180deg, var(--hero-wash) 0%, transparent 100%);
  opacity: 0.95;
}
.home-hero-wrap::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: min(72vh, 36rem);
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.page > .hero,
.page > .hero-divider,
.page > .profile-grid,
.page > .section,
.page > footer {
  position: relative;
  z-index: 1;
}
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2.5rem 0 0;
}
.hero-name {
  font-family: var(--display);
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0;
}
.hero-name .line {
  display: block;
  overflow: hidden;
}
.hero-name .char {
  display: inline-block;
  will-change: transform, opacity;
}
.hero-role {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--role);
  margin: 1rem 0 0;
  letter-spacing: -0.01em;
}
.hero-photo {
  max-width: min(100%, 17.5rem);
  width: 100%;
  margin-inline: auto;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 20px;
  background: #f0eeeb;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.08);
}
.hero-divider {
  border-top: 1px solid var(--line);
  margin: 2.5rem 0 0;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding-top: 2.5rem;
}
.sidebar-block {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.sidebar-block:first-child { border-top: none; padding-top: 0; }
.pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pill-text);
  background: var(--pill-bg);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}
.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.focus-list li {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}
.focus-list li:last-child { margin-bottom: 0; }
.focus-list a {
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.focus-list a:hover { color: var(--role); }
.connect-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.connect-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s var(--ease-out), transform 0.25s var(--ease-out);
  border-radius: 4px;
}
.connect-icons a:hover {
  opacity: 1;
  transform: translateY(-2px);
}
.connect-icons svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}
.bio-col {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.bio-text {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #222;
}
.bio-text p { margin: 0 0 1.15rem; }
.bio-text p:last-child { margin-bottom: 0; }
.bio-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.section {
  padding: 3rem 0 0;
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
.section > .section-title { margin-bottom: 2rem; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}
.section-see-all {
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.section-see-all:hover { text-decoration-thickness: 2px; }
.section-intro {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 42rem;
}
.writing-subsection { margin: 0; }
.subsection-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}
.subsection-lede {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 42rem;
}
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.work-card h3,
.work-card h4 {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.work-card p {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
  max-width: 36rem;
}
.work-card a.website-link {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.work-card a.website-link:hover { text-decoration-thickness: 2px; }

@media (min-width: 600px) {
  .hero-photo { max-width: min(100%, 21rem); }
}
@media (min-width: 900px) {
  .page { padding: 2.5rem 2.5rem 5rem; }
  .hero {
    grid-template-columns: 1fr min(36%, 22rem);
    align-items: start;
    gap: 3rem;
    padding-top: 3.5rem;
  }
  .hero-photo {
    order: 2;
    max-width: 22rem;
    margin-inline: 0;
    justify-self: end;
  }
  .hero-intro { order: 1; align-self: center; }
  .hero-divider { margin-top: 3.5rem; }
  .profile-grid {
    grid-template-columns: minmax(200px, 28%) 1fr;
    gap: 4rem;
    padding-top: 3rem;
    align-items: start;
  }
  .sidebar { position: sticky; top: 2rem; }
  .sidebar-block {
    border-top: none;
    padding: 0 0 2.5rem;
  }
  .sidebar-block + .sidebar-block {
    border-top: 1px solid var(--line);
    padding-top: 2.5rem;
  }
  .bio-col {
    border-top: none;
    padding: 0;
  }
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 3rem;
  }
}
