:root {
  --bg: #f2f2f2;
  --card: #fff;
  --ink: #474747;
  --muted: #787878;
  --faint: #b3b3b3;
  --line: #e3e3e3;
  --accent: #1ccbd6;
  --display: 'Raleway', sans-serif;
  --body: 'Source Sans 3', 'Source Sans Pro', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 2rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 1.0625rem/1.875 var(--body);
  letter-spacing: 0.025rem;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 62rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

a { color: inherit; transition: color 0.25s ease, border-color 0.25s ease; }
a:hover { color: var(--accent); }

h1, h2, h3, .kicker, .buttons a, .button, .badge, .url {
  font-family: var(--display);
  text-transform: uppercase;
}

h1 { margin: 0; font-size: 1.875rem; line-height: 1.375; font-weight: 700; letter-spacing: 0.4375rem; }
h2 { margin: 0 0 0.5rem; font-size: 1.25rem; line-height: 1.375; font-weight: 700; letter-spacing: 0.39rem; }
h3 { margin: 0; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.2rem; }
p { margin: 0 0 1rem; }
.kicker { margin: 0.25rem 0 1.75rem; font-size: 0.75rem; letter-spacing: 0.22rem; color: var(--faint); }
.lede { color: var(--muted); }

.card {
  background: var(--card);
  padding: 3.5rem 4rem;
  animation: fade 0.8s ease both;
}

@keyframes fade { from { opacity: 0; transform: translateY(0.5rem); } }

/* Hero: text card with the photo bleeding to the right edge, like the Carrd layout */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  align-items: stretch;
}
.hero-text { padding: 4rem; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; display: block; }

.buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.buttons a, .button {
  display: inline-block;
  height: 2.5rem;
  line-height: calc(2.5rem - 2px);
  padding: 0 1rem 0 calc(1rem + 0.25rem);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.25rem;
  text-decoration: none;
}
.buttons a:hover, .button:hover { border-color: var(--accent); }

/* Projects */
.project {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  overflow: hidden;
  text-decoration: none;
  background: var(--card);
}
a.project:hover { border-color: var(--accent); color: inherit; }
a.project:hover h3 { color: var(--accent); }
/* Every card gets the same banner-shaped media area so the grid lines up */
.media {
  aspect-ratio: 1200 / 630;
  background: var(--tint, var(--bg));
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media img.icon { width: 34%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 22%; }
.project > div { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.project p { margin: 0.5rem 0 1rem; font-size: 0.975rem; line-height: 1.7; }
.url { margin-top: auto; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.2rem; color: var(--faint); }
.badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 1rem;
  background: #e6f9fa;
  color: #0e8a92;
  font-size: 0.55rem;
  letter-spacing: 0.15rem;
  vertical-align: 0.15rem;
}

.featured { margin: 1.5rem 0; flex-direction: row; align-items: center; }
.featured .media { width: 55%; flex: none; border-bottom: 0; border-right: 1px solid var(--line); }
.featured > div { justify-content: center; padding: 2rem; }
.featured h3 { font-size: 1.125rem; letter-spacing: 0.3rem; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

/* Experience */
.jobs { list-style: none; margin: 1.5rem 0; padding: 0; }
.jobs li {
  display: grid;
  grid-template-columns: 13rem 1fr auto;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}
.jobs li:last-child { border-bottom: 1px solid var(--line); }
.co { font-weight: 600; }
.co small { font-weight: 300; color: var(--muted); font-size: 0.85em; }
.when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fine { font-size: 0.9375rem; color: var(--muted); margin: 0; }

/* Writing */
.clips { margin: 1rem 0 0; padding-left: 1.1rem; }
.clips li { margin-bottom: 0.4rem; }
.clips span { color: var(--muted); font-size: 0.9375rem; }
.clips span::before { content: "\2014\00a0"; }

.cta { margin: 2rem 0 0; }
.cta .button { margin-left: 0.75rem; }

footer { text-align: center; padding: 1rem 0 0; color: var(--faint); font-size: 0.875rem; }
.icons { list-style: none; display: flex; justify-content: center; gap: 1.25rem; padding: 0; margin: 0 0 0.75rem; }
.icons a { display: block; }
.icons svg { width: 1.5rem; height: 1.5rem; fill: var(--faint); transition: fill 0.25s ease; display: block; }
.icons a:hover svg { fill: var(--muted); }

@media (max-width: 820px) {
  main { padding: 1rem 1rem 2rem; gap: 1rem; }
  .card { padding: 2.25rem 1.5rem; }
  .hero { grid-template-columns: 1fr; padding: 0; }
  .hero-photo { order: -1; aspect-ratio: 1; height: auto; }
  .hero-text { padding: 2.25rem 1.5rem; }
  h1 { font-size: 1.5rem; letter-spacing: 0.3rem; }
  .featured { flex-direction: column; }
  .featured { align-items: stretch; }
  .featured .media { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .featured > div { padding: 1.25rem 1.5rem 1.5rem; }
  .grid { grid-template-columns: 1fr; }
  .jobs li { grid-template-columns: 1fr auto; gap: 0 1rem; }
  .jobs .title { grid-column: 1 / -1; grid-row: 2; color: var(--muted); }
  .cta .button { margin: 0.75rem 0 0; }
}

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