:root {
  color-scheme: dark;
  --bg: #1c1b18;
  --surface: #24221e;
  --text: #eee7d9;
  --muted: #aba497;
  --accent: #dda77e;
  --line: #3c3831;
  --paper: #e6d6b9;
  --sans: "Chivo", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem / 1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

section[tabindex="-1"]:focus {
  outline: none;
}

.container {
  width: min(100% - 2 * var(--gutter), 1088px);
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 30;
  padding: 0.75rem 1rem;
  background: var(--paper);
  color: var(--bg);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(28, 27, 24, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font: 500 0.85rem var(--mono);
}

.brand span {
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  font-size: 0.85rem;
}

.nav-links a {
  padding-block: 0.75rem;
  color: var(--muted);
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14.5rem;
  grid-template-areas:
    "eyebrow portrait"
    "heading portrait"
    "description portrait"
    "actions portrait";
  column-gap: 4rem;
  padding-block: clamp(4rem, 8vw, 7rem) clamp(4.5rem, 8vw, 7rem);
}

.eyebrow {
  grid-area: eyebrow;
  margin: 0;
  color: var(--muted);
  font: 400 0.7rem / 1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.headline {
  grid-area: heading;
  margin: 1.25rem 0 1.5rem -0.06em;
  font-size: clamp(4rem, 11vw, 9.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.headline span {
  color: var(--accent);
}

.lead {
  grid-area: description;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.hero-links {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 1.75rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--accent);
  font-size: 0.85rem;
}

.text-link.secondary {
  color: var(--muted);
}

.text-link svg {
  transition: transform 240ms var(--ease);
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--text);
}

.text-link:hover svg {
  transform: translate(2px, -2px);
}

.hero-links a:first-child:hover svg {
  transform: translateY(3px);
}

.portrait {
  grid-area: portrait;
  align-self: center;
  padding: 1.25rem;
  background: var(--paper);
  color: #5a3d2d;
  border-radius: 2px;
  box-shadow: 7px 7px 0 rgba(230, 214, 185, 0.06);
  transform: rotate(4deg);
  transition: transform 420ms var(--ease);
}

.portrait:hover,
.portrait:focus-visible {
  transform: rotate(0deg) translateY(-3px);
}

.portrait img {
  width: 100%;
  height: auto;
}

.portrait-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  font: 400 0.7rem var(--mono);
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}

.project-count {
  display: inline-block;
  vertical-align: top;
  margin: 0.2rem 0 0 0.4rem;
  color: var(--muted);
  font: 400 0.7rem var(--mono);
  letter-spacing: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.6rem 0 0.9rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.82rem;
  transition: color 180ms ease;
}

.filter small {
  font: 400 0.65rem var(--mono);
}

.filter::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}

.filter:hover,
.filter[aria-pressed="true"] {
  color: var(--text);
}

.filter[aria-pressed="true"]::after {
  transform: scaleX(1);
}

.project-list {
  overflow: clip;
  border-top: 1px solid var(--line);
}

.project {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  min-height: 9rem;
  padding: 1.75rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 220ms ease;
}

.project-number {
  align-self: start;
  margin-top: 0.25rem;
  color: var(--muted);
  font: 400 0.7rem var(--mono);
}

.project-title {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.project-title a {
  transition: color 180ms ease;
}

.project-title a:hover {
  color: var(--accent);
}

.project-desc {
  max-width: 56ch;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.2rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font: 400 0.68rem var(--mono);
}

.project-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.project-meta i {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--language-color, var(--accent));
}

.project-meta svg {
  width: 0.8rem;
  height: 0.8rem;
}

.project-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  min-width: 7.5rem;
}

.project-actions .text-link {
  font-size: 0.8rem;
}

.loading,
.note {
  margin: 0;
  padding-block: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.more-wrap {
  display: flex;
  justify-content: center;
}

.more-button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
  margin-top: 1.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: none;
  font-size: 0.8rem;
  transition: border-color 180ms ease, background 180ms ease;
}

.more-button:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.details {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: start;
  gap: clamp(2rem, 7vw, 6rem);
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.about p {
  max-width: 33ch;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.contact-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 60px;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
}

.contact-label,
.copy-label {
  color: var(--muted);
  font: 400 0.65rem var(--mono);
}

.contact-value {
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  transition: color 180ms ease;
}

.contact-row:hover .contact-value,
.contact-row.copied .copy-label {
  color: var(--accent);
}

.contact-row > :last-child {
  justify-self: end;
}

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-top: 5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 400 0.68rem / 1.5 var(--mono);
}

.footer p {
  margin: 0;
}

.footer a:hover {
  color: var(--text);
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  z-index: 20;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--bg);
  font-size: 0.85rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 240ms var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (hover: hover) and (pointer: fine) {
  .project:hover {
    background: var(--surface);
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 7rem;
    grid-template-areas:
      "eyebrow portrait"
      "heading heading"
      "description description"
      "actions actions";
    column-gap: 1rem;
    padding-top: 2.5rem;
  }

  .hero .eyebrow {
    align-self: center;
  }

  .headline {
    font-size: clamp(4rem, 15vw, 7rem);
    margin-top: 1.75rem;
  }

  .portrait {
    padding: 0.6rem;
    box-shadow: 4px 4px 0 rgba(230, 214, 185, 0.06);
  }

  .portrait-caption {
    display: none;
  }

  .details {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about p {
    max-width: 48ch;
  }
}

@media (max-width: 540px) {
  .nav {
    min-height: 68px;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .section-head .text-link {
    font-size: 0.75rem;
  }

  .project {
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: 0.75rem;
    padding-block: 1.4rem;
  }

  .project-actions {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 1.5rem;
  }

  .contact-row {
    grid-template-columns: 3.5rem minmax(0, 1fr) 2.5rem;
    gap: 0.5rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .portrait,
  .portrait:hover,
  .portrait:focus-visible,
  .text-link:hover svg,
  .hero-links a:first-child:hover svg {
    transform: none;
  }
}
