*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white: #ffffff;
  --off-white: #f5f5f5;
  --black: #111111;
  --gray: #595959;
  --gray-on-black: #a8a8a8;
  --line: #e2e2e2;
  --field-line: #8c8c8c;
  --accent: #FF9E6D;
  --accent-hover: #FF8A50;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
ul { list-style: none; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
main:focus { outline: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 10px 16px;
  background: var(--black);
  color: var(--white);
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.site-nav ul { display: flex; align-items: center; gap: 28px; }
.site-nav a { font-size: 0.9375rem; text-decoration: none; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

/* Buttons */
.button {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--black);
  border-radius: 0;
  background: var(--black);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--white); color: var(--black); }
.button:disabled { opacity: 0.6; cursor: default; }

.site-nav .button { padding: 8px 18px; font-size: 0.9375rem; }
.site-nav .button:hover,
.site-nav .button[aria-current="page"] { text-decoration: none; }

/* Placeholder images: the classic crossed box */
.image-placeholder {
  --cross-line: #c4c4c4;
  --cross-fill: #ececec;
  --cross: transparent calc(50% - 0.5px), var(--cross-line) calc(50% - 0.5px), var(--cross-line) calc(50% + 0.5px), transparent calc(50% + 0.5px);
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  background:
    linear-gradient(to top right, var(--cross)),
    linear-gradient(to bottom right, var(--cross)),
    var(--cross-fill);
}

/* Text standing in for content that isn't written yet */
.placeholder-text { color: var(--gray); }

/* Sections */
.section { padding: 112px 0; }
.section--tinted { background: var(--off-white); }
.section--dark { background: var(--black); color: var(--white); }

.section-title {
  max-width: 18em;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.section-intro {
  max-width: 34em;
  margin-top: 20px;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.4;
  color: var(--gray);
}
.section--dark .section-intro { color: var(--gray-on-black); }

.grid { display: grid; gap: 32px; margin-top: 64px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.item-title {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.item-text { margin-top: 8px; color: var(--gray); }
.image-placeholder + .item-title { margin-top: 24px; }

/* Homepage hero */
.hero { position: relative; }
.hero { background: var(--black); }
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0) 65%);
}
.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  max-width: none;
  min-height: 85vh;
  padding-top: 64px;
  padding-bottom: 64px;
  color: var(--white);
}
.hero-title {
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(2.25rem, 11vw, 5.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.hero-subline {
  margin-top: 40px;
  font-size: clamp(1.375rem, 3.6vw, 1.875rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.flip-wrap { display: inline-block; perspective: 400px; }
.flip-word {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.92em;
  font-style: normal;
  font-weight: 600;
  letter-spacing: -0.03em;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.flip-word.flip-out { transform: rotateX(90deg); opacity: 0; }
.flip-word.flip-in-start { transform: rotateX(-90deg); opacity: 0; transition: none; }

/* Credentials */
.credential { padding-top: 24px; border-top: 1px solid var(--black); }
.credential-list { margin-top: 16px; }
.credential-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.certifications { margin-top: 56px; }
.cert-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 32px;
  margin-top: 16px;
}
.cert-list { margin-top: 24px; align-items: center; }
.cert-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
}
.cert-mark { display: block; flex: none; width: auto; height: 26px; }
.cert-mark--wide { height: 18px; }

/* Contact section: two equal halves. Headline, value prop and form on the
   left; icon-led contact options on the right, starting level with the value prop. */
.reach-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    ".    title"
    "side points"
    "side form";
  grid-template-rows: auto auto 1fr;
  column-gap: 96px;
  align-items: start;
}
.reach-main { display: contents; }
.reach-main > .section-title { grid-area: title; }
.reach-main > .reach-points { grid-area: points; }
.reach-main > .contact-form { grid-area: form; margin-top: 32px; }
.reach-side { grid-area: side; margin-top: 20px; }
.reach-options { display: flex; flex-direction: column; gap: 16px; }
.reach-option {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.4;
}
.reach-icon {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.reach-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.reach-link:hover { text-decoration-thickness: 2px; }
.reach-points { margin-top: 20px; }
.reach-points li {
  position: relative;
  padding: 3px 0 3px 24px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.4;
}
.reach-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(3px + 0.7em - 3px);
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: currentColor;
}

.section--dark .item-text { color: var(--gray-on-black); }
.section--dark .contact-form label { color: var(--white); }
.section--dark .form-field input,
.section--dark .form-field textarea { border-color: var(--white); }

/* Primary call to action: orange from the hero words, black text (9:1 contrast) */
.button--primary { background: var(--accent); border-color: var(--accent); color: var(--black); }
.button--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--black); }
.section--dark .button--primary:focus-visible { outline-color: var(--white); }

/* Click-to-reveal contact details (keeps them away from spam bots) */
.reveal-copy {
  padding: 6px 14px;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}
.reveal-copy:hover { background: var(--white); color: var(--black); }
.reveal-hint { margin-top: 6px; font-size: 0.875rem; color: var(--gray-on-black); }
.reveal-value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.reveal-address { user-select: all; overflow-wrap: anywhere; }
.reveal-address:focus { outline: none; }

/* Inner pages */
.page-intro { padding: 80px 0 0; }
.page-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.page-body { padding: 56px 0 112px; }

/* Useful Things */
.page-body .grid { margin-top: 0; row-gap: 56px; }
.project-card { display: block; text-decoration: none; }
.project-card:hover .item-title { text-decoration: underline; text-underline-offset: 4px; }

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 80px;
}
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-field label { display: block; margin-bottom: 8px; font-size: 0.9375rem; font-weight: 500; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--field-line);
  border-radius: 0;
  background: var(--white);
  color: var(--black);
  font: inherit;
}
.form-field textarea { resize: vertical; }
.form-honeypot { position: absolute; left: -9999px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px; }
.form-status:empty { display: none; }

.contact-other-title { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em; }
.contact-option { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-option-title { font-weight: 600; }

/* Footer */
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 32px;
  padding-bottom: 48px;
  font-size: 0.9375rem;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 860px) {
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .reach-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "points" "form" "side";
    grid-template-rows: auto;
  }
  .reach-side { margin-top: 56px; }
  .section { padding: 80px 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .cert-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav .nav-section-link { display: none; }
  .site-nav ul { gap: 16px; }
  .hero-content { min-height: 80vh; padding-top: 40px; padding-bottom: 40px; }  .page-intro { padding: 48px 0 0; }
  .page-body { padding: 40px 0 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
