:root {
  --bg: #f6f1e9;
  --bg-raised: #ffffff;
  --fg: #1c1a17;
  --fg-muted: #6b6459;
  --accent: #8a2f2f;
  --border: #e3dbcb;
  --max-width: 960px;
  color-scheme: light;

  /* Header sits on a fixed dark backdrop in both themes, so its text
     colors are intentionally decoupled from the theme-following tokens
     above (which flip for dark mode) rather than reused from them. */
  --header-bg: #14120f;
  --header-fg: #b5aa98;
  --header-fg-hover: #f3ede2;
  --header-accent: #e0776b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--header-bg);
  color: var(--header-fg-hover);
  padding: 0.75rem 1rem;
  z-index: 100;
}

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

.site-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.mark {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--header-accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header nav {
  display: flex;
  gap: 1.75rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.site-header nav a {
  color: var(--header-fg);
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--header-fg-hover);
}

.eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero {
  padding: 5rem 0 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr auto;
  align-items: center;
  gap: 3rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.18;
  margin: 0 0 1.5rem;
  font-weight: 500;
}

.hero .lede {
  max-width: 56ch;
  color: var(--fg-muted);
  font-size: 1.1rem;
}

.hero-photo img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.cta {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cta:hover,
.cta:focus-visible {
  color: var(--accent);
}

.work,
.contact {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.work h2,
.contact h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  max-width: 32ch;
  margin: 0 0 3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.98rem;
}

.contact .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.contact .links a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.contact .links a:hover,
.contact .links a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--fg-muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --bg-raised: #1e1b17;
    --fg: #f3ede2;
    --fg-muted: #b5aa98;
    --accent: #e0776b;
    --border: #2a251f;
    color-scheme: dark;
  }
}

@media (max-width: 640px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-photo {
    order: -1;
  }

  .hero .lede {
    margin-left: auto;
    margin-right: auto;
  }
}
