:root {
  --bg: #faf5e9;
  --bg-alt: #f6e2d0;
  --surface: #fffdf6;
  --text: #1a2529;
  --text-muted: #5a6469;
  --border: #ebe1c8;
  --accent: #2f6a68;
  --accent-hover: #245452;
  --accent-soft: #e0eae7;
  --accent-2: #c58a2a;
  --danger: #b91c1c;
  --success: #047857;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.06);

  --max-w: 1100px;
  --gutter: 1.25rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.brand-name {
  font-size: 1.05rem;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: var(--text-muted);
  font-weight: 500;
}

.primary-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.primary-nav .nav-cta {
  color: #fff;
  background: var(--accent);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
}

.primary-nav .nav-cta:hover {
  background: var(--accent-hover);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  gap: 4px;
  flex-direction: column;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 120ms ease, color 120ms ease,
    border-color 120ms ease, transform 120ms ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  text-decoration: none;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-lede {
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.2rem;
}

/* Hero */
.hero {
  padding: 5.5rem 0 4.5rem;
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(900px 400px at -10% 20%, #f4dcc4, transparent 60%),
    var(--bg);
}

.hero-inner {
  max-width: 780px;
}

.hero h1 {
  margin-bottom: 1rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Cards */
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease,
    border-color 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-muted);
  margin: 0;
}

/* About */
.about-copy {
  max-width: 760px;
}

.about-copy p {
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

/* Selected work */
.work-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.work-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.work-item h3 {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.work-item p {
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.work-item p:last-child {
  margin-bottom: 0;
}

.work-meta {
  font-size: 0.88rem;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
}

/* Publications */
.pubs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.pubs li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
}

.pubs li a {
  color: var(--accent);
  font-weight: 500;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.contact-list li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.contact-label {
  color: var(--text-muted);
  min-width: 54px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 1rem;
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 106, 104, 0.18);
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field.has-error input,
.field.has-error textarea {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin: 0;
}

.form-success {
  color: var(--success);
  font-weight: 600;
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-note {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-inner p {
  margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .work-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
    padding: 0.75rem var(--gutter);
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .primary-nav li a {
    display: block;
    padding: 0.7rem 0.25rem;
  }

  .primary-nav .nav-cta {
    text-align: center;
    margin-top: 0.5rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
