:root {
  color-scheme: light;
  --ink: #111416;
  --muted: #5a6462;
  --paper: #f7f8f6;
  --panel: #ffffff;
  --line: #dfe5e1;
  --teal: #0f6b68;
  --teal-dark: #093f41;
  --amber: #e0a11a;
  --red: #c84b32;
  --green: #29795d;
  --shadow: 0 16px 40px rgba(17, 20, 22, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

#work,
#themes,
#contact {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(17, 20, 22, 0.1);
  background: rgba(247, 248, 246, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: #e8efec;
  color: var(--ink);
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(520px, 78svh, 760px);
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 8, 9, 0.82) 0%, rgba(4, 8, 9, 0.5) 45%, rgba(4, 8, 9, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 20, 22, 0.34), rgba(17, 20, 22, 0.04));
}

.hero-content {
  width: min(760px, 90vw);
  align-self: center;
  padding: 56px 0 72px 5vw;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #95f0df;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 11ch;
  font-size: 4.8rem;
}

h2 {
  font-size: 2.8rem;
}

h3 {
  font-size: 1.35rem;
}

.hero-copy {
  width: min(620px, 100%);
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.17rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--amber);
  color: var(--ink);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #f0b52c;
  outline: 3px solid rgba(224, 161, 26, 0.28);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  outline: 3px solid rgba(255, 255, 255, 0.18);
}

.button.compact {
  width: fit-content;
  min-height: 44px;
  padding: 10px 14px;
}

.section {
  padding: 84px 5vw;
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--ink);
}

.intro-item {
  min-height: 190px;
  padding: 30px;
  background: var(--panel);
}

.intro-item span {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--red);
  font-weight: 900;
}

.intro-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.intro-item p {
  margin: 0;
  color: var(--muted);
}

.work-section,
.theme-section,
.contact-section {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.55fr);
  gap: 32px;
  align-items: end;
}

.section-heading .eyebrow,
.section-heading h2 {
  grid-column: 1;
}

.section-heading p {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.filter {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter:hover,
.filter:focus-visible,
.filter.is-active {
  border-color: var(--teal);
  background: #e4f4ef;
  color: var(--teal-dark);
  outline: none;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.project-card {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(17, 20, 22, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #b9c9c3;
  box-shadow: var(--shadow);
}

.project-card.is-hidden {
  display: none;
}

.tag {
  width: fit-content;
  margin-bottom: 22px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tag.software {
  background: var(--teal);
}

.tag.apps {
  background: var(--green);
}

.tag.games {
  background: var(--red);
}

.tag.oddities {
  background: #7352a3;
}

.project-card p {
  margin: 14px 0 28px;
  color: var(--muted);
}

.project-card a {
  margin-top: auto;
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.theme-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 0.6fr);
  gap: 34px;
  align-items: center;
}

.theme-section {
  border-top: 1px solid var(--line);
}

.theme-section p,
.contact-section p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.06rem;
}

.theme-panel {
  display: grid;
  gap: 16px;
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101617;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.panel-label {
  width: fit-content;
  color: #8ce8d7;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.theme-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.contact-section {
  border-top: 1px solid var(--line);
}

.contact-link {
  display: grid;
  gap: 8px;
  min-height: 138px;
  align-content: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(17, 20, 22, 0.04);
}

.contact-link:hover,
.contact-link:focus-visible {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  outline: none;
}

.contact-link span {
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-link strong {
  font-size: 1.5rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 5vw;
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

@media (max-width: 920px) {
  .section-heading,
  .theme-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .section-heading p {
    grid-column: auto;
    grid-row: auto;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-band {
    grid-template-columns: 1fr;
  }

  .intro-item {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    min-height: 108px;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  #work,
  #themes,
  #contact {
    scroll-margin-top: 132px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav a {
    flex: 1;
    padding-inline: 8px;
    text-align: center;
  }

  .hero {
    min-height: 560px;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(4, 8, 9, 0.82) 0%, rgba(4, 8, 9, 0.56) 72%, rgba(4, 8, 9, 0.22) 100%);
  }

  .hero-content {
    align-self: end;
    padding: 42px 5vw 54px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  .section {
    padding: 62px 5vw;
  }

  .intro-band {
    padding-top: 0;
    padding-bottom: 0;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 250px;
  }

  .hero-actions,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .filter {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}
