@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f3ec;
  --surface: #fffdf8;
  --ink: #1a1814;
  --muted: #625c51;
  --rule: #ddd6c8;

  --dominex: #a8492f;
  --dominex-tint: #efe6d6;
  --ccse: #b3202a;
  --ccse-tint: #e7ebf2;
  --retro: #1a1814;
  --retro-tint: #e9e7e1;
  --svm: #1565d8;
  --svm-tint: #e4edf9;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
  --radius: 20px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171512;
    --surface: #211e19;
    --ink: #f2eee6;
    --muted: #a9a294;
    --rule: #37322a;

    --dominex: #e08a6c;
    --dominex-tint: #241f17;
    --ccse: #f0727a;
    --ccse-tint: #1d212a;
    --retro: #f2eee6;
    --retro-tint: #23211d;
    --svm: #6ea6ff;
    --svm-tint: #1a2230;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 16px;
}

/* Intro */

.intro {
  padding-top: clamp(56px, 10vw, 120px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.kicker,
.meta {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
.tagline {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  margin: 12px 0 20px;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 0.98;
}

.lede {
  max-width: 36em;
  margin: 0;
  font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.5;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 24px 0 0;
  font-weight: 600;
}

.index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(40px, 6vw, 64px);
}

.index a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
  color: var(--muted);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.index a:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.index img {
  flex: none;
  border-radius: 10px;
}

.index strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
}

/* Projects */

.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(48px, 8vw, 96px);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 16px;
}

.project:nth-child(even) .copy {
  order: 2;
}

.project-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon {
  flex: none;
  border-radius: 15px;
  box-shadow: 0 0 0 1px var(--rule);
}

h2 {
  margin: 0 0 2px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
}

.project .meta {
  color: var(--accent);
}

.tagline {
  margin: 28px 0 14px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 500;
  line-height: 1.2;
}

.copy > p:not(.tagline):not(.actions) {
  margin: 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 28px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

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

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

.site-link {
  font-size: 15px;
  font-weight: 600;
}

.site-link::after {
  content: " →";
}

.media {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(20px, 4vw, 40px);
  background: var(--tint);
  border-radius: var(--radius);
  overflow: hidden;
}

.media.wide {
  padding: 0;
}

.media.phone {
  padding-bottom: 0;
  align-items: flex-start;
  max-height: 560px;
}

.media.phone img {
  width: min(300px, 70%);
  border-radius: 32px 32px 0 0;
  border: 1px solid var(--rule);
  border-bottom: 0;
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.12);
}

.media.card img {
  width: min(420px, 100%);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.1);
}

/* About */

.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(48px, 8vw, 96px);
  border-top: 1px solid var(--rule);
}

.about p {
  margin: 0 0 16px;
  font-size: 19px;
  color: var(--muted);
}

.about a {
  color: var(--ink);
  font-weight: 600;
}

footer {
  padding-block: 32px 48px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
}

footer p {
  margin: 0;
}

/* Small screens */

@media (max-width: 900px) {
  .index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .project,
  .about {
    grid-template-columns: minmax(0, 1fr);
  }

  .project:nth-child(even) .copy {
    order: 0;
  }

  .media.phone {
    max-height: 440px;
  }
}

@media (max-width: 420px) {
  .index {
    grid-template-columns: minmax(0, 1fr);
  }
}
