:root {
  color-scheme: light;
  --paper: #f7f0e3;
  --paper-deep: #eadfcf;
  --ink: #161512;
  --muted: #655f55;
  --terracotta: #b95635;
  --terracotta-dark: #843620;
  --teal: #4f8f8c;
  --cobalt: #335f97;
  --line: rgba(22, 21, 18, 0.14);
  --shadow: 0 28px 80px rgba(22, 21, 18, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(22, 21, 18, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, var(--paper), #fbf7ed 42%, var(--paper-deep));
  color: var(--ink);
  font-family:
    Aptos, "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 86, 53, 0.2), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(79, 143, 140, 0.18), transparent 28%),
    linear-gradient(115deg, transparent 0 58%, rgba(51, 95, 151, 0.1) 58% 74%, transparent 74%);
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 240, 227, 0.82);
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(22, 21, 18, 0.28);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.nav {
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.nav a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.36em;
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(420px, 0.86fr) minmax(420px, 1fr);
  align-items: center;
  min-height: calc(100svh - 75px);
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(42px, 7vw, 92px) clamp(20px, 5vw, 72px) clamp(36px, 5vw, 62px);
}

.hero-copy {
  min-width: 0;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--terracotta-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 9ch;
  margin-bottom: 26px;
  font-family:
    Aptos Display, "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(4.2rem, 8vw, 7.7rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-family:
    Aptos Display, "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 760;
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 760;
  line-height: 1.05;
}

.intro {
  max-width: 56ch;
  margin-bottom: 34px;
  color: #34302a;
  font-size: clamp(1.16rem, 2vw, 1.5rem);
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  font-weight: 800;
  text-decoration: none;
}

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

.button.secondary {
  background: rgba(247, 240, 227, 0.5);
}

.portrait-card {
  position: relative;
  min-width: 0;
  margin: 0;
  transform: rotate(1.5deg);
}

.portrait-card::before {
  position: absolute;
  inset: 18px -18px -18px 18px;
  z-index: -1;
  content: "";
  border: 1px solid rgba(22, 21, 18, 0.32);
  background: linear-gradient(135deg, var(--teal), var(--terracotta));
}

.portrait-card img {
  width: 100%;
  height: min(66vh, 660px);
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(22, 21, 18, 0.34);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.section {
  padding: clamp(62px, 8vw, 116px) clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.work-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 6vw, 88px);
}

.section-heading {
  max-width: 760px;
}

.contact-copy p:last-child,
.tile p {
  margin-bottom: 0;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 22px;
  border: 1px solid rgba(22, 21, 18, 0.18);
  background: rgba(255, 251, 241, 0.62);
}

.tile-link {
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.tile-link:hover,
.tile-link:focus-visible {
  border-color: rgba(22, 21, 18, 0.46);
  background: rgba(255, 251, 241, 0.9);
  transform: translateY(-3px);
}

.tile-link:focus-visible {
  outline: 3px solid rgba(185, 86, 53, 0.42);
  outline-offset: 3px;
}

.tile:nth-child(2),
.link-item:nth-child(2) {
  background: rgba(79, 143, 140, 0.13);
}

.tile:nth-child(3),
.link-item:nth-child(3) {
  background: rgba(185, 86, 53, 0.13);
}

.tile-number {
  display: inline-block;
  margin-bottom: 64px;
  color: var(--terracotta-dark);
  font-size: 0.8rem;
  font-weight: 900;
}

.tile p {
  color: var(--muted);
}

.page-hero {
  padding: clamp(62px, 9vw, 126px) clamp(20px, 5vw, 72px) clamp(34px, 5vw, 62px);
}

.page-hero h1 {
  max-width: 11ch;
}

.page-section {
  padding-top: clamp(38px, 5vw, 72px);
}

.project-list,
.link-board {
  display: grid;
  gap: 18px;
}

.project-item,
.link-item {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(22, 21, 18, 0.16);
  background: rgba(255, 251, 241, 0.62);
}

.project-item {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 4vw, 42px);
}

.game-card {
  grid-template-columns: clamp(120px, 16vw, 190px) minmax(0, 1fr);
  align-items: center;
}

.game-logo-frame {
  display: grid;
  width: clamp(120px, 16vw, 190px);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(22, 21, 18, 0.16);
  background: #11131d;
}

.game-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-logo-empty {
  display: grid;
  place-items: center;
  color: var(--paper);
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 900;
}

.project-item .eyebrow {
  margin: 0;
}

.project-item h2,
.link-item h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3.4vw, 3.2rem);
}

.project-item p:last-child,
.link-item p:last-child {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.4vw, 1.2rem);
}

.link-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.link-item {
  min-height: 280px;
}

.page-note {
  max-width: 58ch;
  margin: -12px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.14rem);
}

.toolbox-section {
  display: grid;
  gap: clamp(42px, 6vw, 78px);
}

.toolbox-category {
  display: grid;
  grid-template-columns: minmax(240px, 0.36fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
}

.toolbox-category-heading {
  max-width: 420px;
}

.toolbox-category-heading h2 {
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  display: grid;
  grid-template-rows: auto 96px 1fr;
  min-height: 230px;
  align-items: start;
  padding: 20px;
  border: 1px solid rgba(22, 21, 18, 0.16);
  background: rgba(255, 251, 241, 0.68);
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: rgba(22, 21, 18, 0.46);
  background: rgba(255, 251, 241, 0.94);
  transform: translateY(-3px);
}

.tool-card:focus-visible {
  outline: 3px solid rgba(185, 86, 53, 0.42);
  outline-offset: 3px;
}

.tool-domain {
  color: var(--terracotta-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.tool-title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  height: 96px;
  padding: 18px 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.7vw, 1.55rem);
  font-weight: 760;
  line-height: 1.08;
}

.tool-title img {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(22, 21, 18, 0.14);
  background: rgba(255, 255, 255, 0.7);
  object-fit: contain;
}

.tool-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.final-thought {
  display: grid;
  grid-template-columns: minmax(240px, 0.36fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(22, 21, 18, 0.18);
  background: var(--ink);
  color: var(--paper);
}

.final-thought .eyebrow {
  color: #f4a779;
}

.final-thought p:last-child {
  max-width: 62ch;
  margin-bottom: 0;
  color: rgba(247, 240, 227, 0.76);
  font-size: clamp(1.08rem, 1.5vw, 1.24rem);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  align-items: end;
  gap: clamp(28px, 6vw, 88px);
  background:
    linear-gradient(90deg, rgba(22, 21, 18, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--ink);
  color: var(--paper);
}

.contact-section .eyebrow {
  color: #f4a779;
}

.contact-copy {
  max-width: 640px;
}

.contact-copy p {
  margin-bottom: 22px;
  max-width: 640px;
  color: rgba(247, 240, 227, 0.74);
  font-size: clamp(1.08rem, 1.6vw, 1.32rem);
}

.contact-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-button {
  min-height: 76px;
  justify-content: space-between;
  gap: 18px;
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.08rem;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.contact-button:hover,
.contact-button:focus-visible {
  background: #fffaf0;
  transform: translateY(-3px);
}

.contact-button > span:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-button small {
  margin-bottom: 2px;
  color: var(--terracotta-dark);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-button > span:last-child {
  font-size: 1.4rem;
}

.contact-button-secondary {
  background: transparent;
  color: var(--paper);
}

.contact-button-secondary:hover,
.contact-button-secondary:focus-visible {
  background: rgba(247, 240, 227, 0.1);
}

.contact-button-secondary small {
  color: #f4a779;
}

@media (max-width: 980px) {
  .hero,
  .work-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    max-width: 820px;
  }

  h1 {
    max-width: none;
  }

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

  .project-item,
  .game-card,
  .toolbox-category,
  .tool-grid,
  .contact-buttons,
  .final-thought,
  .link-board {
    grid-template-columns: 1fr;
  }

  .game-logo-frame {
    max-width: 220px;
  }

  .tile {
    min-height: 190px;
  }

  .tile-number {
    margin-bottom: 36px;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 14px;
  }

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

  h1 {
    font-size: clamp(3.4rem, 15vw, 4rem);
  }

  .portrait-card {
    transform: none;
  }

  .portrait-card img {
    height: auto;
  }

  .portrait-card::before {
    inset: 10px -10px -10px 10px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }
}
