:root {
  --deep: #1f2e1a;
  --dark: #374e2c;
  --cedar: #4a6741;
  --light: #7ab56e;
  --mist: #b8d4b0;
  --pale: #dfe9d9;
  --paper: #fbfbf8;
  --rule: #3b4d33;
  --serif: Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 6vw, 64px);
  --ridge-height: clamp(220px, 42vh, 400px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--deep);
  color: var(--deep);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
}

a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }

.site-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 24px var(--gutter);
  font-size: 16px;
}

.brand { font-family: var(--serif); font-weight: 700; font-size: 19px; text-decoration: none; }

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: min(100svh, 860px);
  padding-bottom: calc(var(--ridge-height) * 0.86);
  background: linear-gradient(180deg, #9fbb9a 0%, var(--mist) 40%, var(--pale) 78%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pale);
  opacity: 0;
  pointer-events: none;
  animation: mist-lift 2.2s ease-out;
}

@keyframes mist-lift {
  from { opacity: 0.9; }
  to { opacity: 0; }
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: clamp(24px, 6vh, 64px) var(--gutter) 24px;
}

.hero-text h1 {
  font-size: clamp(38px, 6.4vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.hero-text p { margin: 16px 0 0; font-size: clamp(18px, 2.2vw, 21px); color: var(--dark); }

.ridge {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--ridge-height);
  object-fit: cover;
  object-position: center bottom;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%);
  mask-image: linear-gradient(180deg, transparent, #000 30%);
}

.lower { color: #eaf0e4; padding: 40px var(--gutter) 24px; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 12px 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}

.row h2 { font-size: 20px; color: var(--mist); }

.project-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

.project h3 { font-size: clamp(26px, 3.4vw, 32px); line-height: 1.2; }

.project p { margin: 8px 0 12px; color: var(--mist); }

.project a { color: var(--light); }

.badge {
  border: 1px solid var(--light);
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 14px;
  color: var(--mist);
  white-space: nowrap;
}

.email { font-family: var(--serif); font-size: clamp(21px, 3vw, 26px); overflow-wrap: anywhere; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 16px var(--gutter) 32px;
  font-size: 15px;
  color: var(--mist);
}

.footer-links a { margin-left: 16px; }

.footer-links a:first-child { margin-left: 0; }

/* Privacy and terms pages */
.legal { background: var(--paper); }

.legal .band {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: linear-gradient(180deg, #9fbb9a 0%, var(--pale) 100%);
}

.legal .band .ridge {
  height: 150px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 65%);
  mask-image: linear-gradient(180deg, transparent, #000 65%);
}

.legal main {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 16px 56px;
  font-family: var(--serif);
  line-height: 1.65;
}

.legal h1 { font-size: clamp(32px, 5vw, 42px); line-height: 1.15; }

.legal h2 { font-size: 22px; margin: 32px 0 8px; }

.legal p { margin: 0 0 16px; }

.legal .updated { color: var(--cedar); font-family: var(--sans); font-size: 15px; }

.legal main a { color: var(--cedar); }

.legal .site-footer { background: var(--deep); }

@media (max-width: 620px) {
  .row { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::after { animation: none; }
}
