:root {
  --navy: #13243a;
  --text: #394a5b;
  --tea-green: #395c46;
  --border: #d8e2d9;
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font: 1rem / 1.65 "Segoe UI", system-ui, sans-serif;
}

main {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

h1, h2, h3, p {
  margin: 0;
}

.hero {
  position: relative;
  padding-block: clamp(3rem, 6.5vw, 5.75rem) clamp(2.75rem, 5vw, 4.25rem);
}

h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-headline {
  max-width: 38ch;
  margin-top: 0.875rem;
  font-size: clamp(1.25rem, 2.25vw, 1.625rem);
  font-weight: 600;
  line-height: 1.3;
}

.hero-intro {
  max-width: 52ch;
  margin-top: 0.875rem;
  color: var(--text);
  font-size: 1.125rem;
}

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

.hero-actions a {
  padding: 0.625rem 1.125rem;
  border: 1px solid var(--tea-green);
  border-radius: 0.375rem;
  font-weight: 650;
  text-decoration: none;
}

.projects-link {
  background: var(--tea-green);
  color: #fff;
}

.document-link {
  color: var(--tea-green);
}

.hero-actions a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
}

section {
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--border);
}

h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.project-grid {
  display: grid;
  gap: 1rem;
}

.project-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

.project-status {
  margin-block: 0.375rem 1rem;
  color: var(--tea-green);
  font-size: 0.9375rem;
  font-weight: 650;
}

.project-card p:not(.project-status), .about p, .case-study section p {
  color: var(--text);
}

.about p, .case-study section p {
  max-width: 65ch;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.contact-link {
  gap: 0.4rem;
}

.contact-link svg {
  width: 1em;
  height: 1em;
  flex: none;
}

.case-study-link, .contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--tea-green);
  font-weight: 650;
  text-underline-offset: 0.2em;
}

.project-card .case-study-link {
  margin-top: 0.5rem;
}

.project-image {
  display: block;
  width: 100%;
  height: auto;
  outline: 1px solid var(--border);
  outline-offset: -1px;
}

.project-carousel {
  position: relative;
  margin-top: 1.25rem;
}

.carousel-stage {
  position: relative;
  aspect-ratio: 2.17;
  background: #f5f8f5;
  outline: 1px solid var(--border);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 0s linear 250ms;
}

.carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.carousel-controls {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: flex;
  border: 1px solid rgb(104 116 128 / 40%);
  border-radius: 999px;
  padding-inline: 2px;
  color: #fff;
}

.carousel-dots {
  display: flex;
}

.carousel-controls button {
  appearance: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.carousel-controls button:focus-visible {
  outline: 2px solid #172337;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 3px white;
}

.carousel-playback::before {
  width: 9px;
  height: 9px;
  border-inline: 2px solid currentColor;
  filter: drop-shadow(0 0 1px #101722) drop-shadow(0 0 0.5px #101722);
  content: "";
}

.carousel-playback[data-paused]::before {
  width: 0;
  height: 0;
  border: 0;
  border-block: 4.5px solid transparent;
  border-inline-start: 8px solid currentColor;
}

.carousel-dot::before {
  width: 5px;
  height: 5px;
  border-radius: 1rem;
  background: #c3c8cf;
  box-shadow: 0 0 0 1px #263041;
  content: "";
}

.carousel-dot[aria-current="true"]::before {
  width: 14px;
  background: #ffe098;
}

@media (any-pointer: coarse) {
  .carousel-controls button {
    width: 28px;
    height: 28px;
  }
}

.project-screens .project-carousel {
  margin-top: 0;
}

.project-card .carousel-controls {
  right: 2px;
  bottom: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.project-card .carousel-controls button {
  width: 16px;
  height: 20px;
}

.project-card .carousel-dot::before {
  width: 4px;
  height: 4px;
  background: #b7bdbb;
  box-shadow: 0 0 0 1px rgb(34 47 43 / 75%);
}

.project-card .carousel-dot[aria-current="true"]::before {
  width: 9px;
  background: #a5bda3;
}

.project-card .carousel-playback::before {
  width: 8px;
  height: 8px;
}

.project-card .carousel-playback[data-paused]::before {
  width: 0;
  height: 0;
  border-block-width: 4px;
  border-inline-start-width: 8px;
}

@media (any-pointer: coarse) {
  .project-card .carousel-controls button {
    width: 24px;
    height: 28px;
    padding: 8px 0 0 4px;
  }
  .project-card .carousel-controls {
    right: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .project-screens .carousel-slide {
    transform: scale(0.985);
    transition: opacity 325ms ease, transform 325ms ease, visibility 0s linear 325ms;
  }

  .project-screens .carousel-slide.is-active {
    transform: scale(1);
    transition-delay: 0s;
  }
}

.project-screens figcaption {
  min-height: 1.65em;
  text-align: left;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide {
    transition: none;
  }
}

.project-screens {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-screens figure {
  min-width: 0;
  margin: 0;
}

.project-screens figcaption {
  margin-top: 0.5rem;
  color: var(--text);
}

.project-access {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.75rem;
  margin-top: 1rem;
}

.case-study {
  max-width: 54rem;
}

.case-study-header {
  padding-block: clamp(2rem, 5vw, 4rem);
}

.case-study-header h1 {
  margin-top: 0.75rem;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.case-study-header .project-status {
  margin-block: 0.75rem 0;
}

.about p + p {
  margin-top: 0.875rem;
}

.experience-roles, .experience-responsibilities {
  display: grid;
  max-width: 65ch;
  margin: 0.875rem 0 0;
  gap: 0.375rem;
}

.experience-roles {
  padding: 0;
  list-style: none;
}

.experience-roles li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1rem;
}

.experience-roles span {
  color: var(--text);
  font-size: 0.9375rem;
  white-space: nowrap;
}

.experience-responsibilities {
  padding-inline-start: 1.25rem;
  color: var(--text);
}

@media (max-width: 35rem) {
  .experience-roles li {
    display: grid;
  }
}

.revision-workflow {
  margin: 0;
}

.revision-workflow figcaption {
  color: var(--tea-green);
  font-weight: 650;
}

.revision-workflow ol {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style-position: inside;
}

.revision-workflow li {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--tea-green);
  border-radius: 0.5rem;
}

.revision-workflow li::marker {
  color: var(--tea-green);
  font-weight: 700;
}

@media (min-width: 48rem) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .revision-workflow ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .hero::after {
    position: absolute;
    inset: 18% 0 18% auto;
    width: 24%;
    background-image: linear-gradient(to right, var(--border) 1px, transparent 1px),
      linear-gradient(to bottom, var(--border) 1px, transparent 1px);
    background-size: 1.5rem 1.5rem;
    mask-image: radial-gradient(ellipse, #000 15%, transparent 72%);
    content: "";
    pointer-events: none;
  }
}
