@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0b0b0c;
  --text: #e9e9eb;
  --muted: #8d8d95;
  --dim: #56565d;
  --mono: "Geist Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16.5px/1.7 "Geist", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .28);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 1px solid var(--text); outline-offset: 3px; }

/* layout */

.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1440px;
  margin: 0 auto;
}

.intro {
  padding: 46px 64px 32px 96px;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  justify-content: space-between;
  font: 13px var(--mono);
  color: var(--muted);
}
.top b { color: var(--text); font-weight: 500; }

/* name */

h1 {
  font: 400 72px/1 "Instrument Serif", serif;
  letter-spacing: -.01em;
  margin: 36px 0 20px;
  white-space: nowrap;
}
h1 .amp { font-style: italic; color: var(--muted); margin-left: .18em; }
h1 .j, h1 .ay, h1 .amp b, h1 .amp i { display: inline-block; font-weight: 400; font-style: inherit; }

h1 .j { animation: rise .7s var(--ease) .1s backwards; }
h1 .ay { animation: rise .6s var(--ease) .45s backwards; }
h1 .amp b { transform-origin: 50% 80%; animation: amp .75s var(--ease) backwards; }
h1 .amp i { transform-origin: 50% 80%; }
h1:hover .amp i { animation: pulse .55s var(--ease); }

h1 .amp b:nth-child(1) { animation-delay: 1.05s; }
h1 .amp b:nth-child(2) { animation-delay: 1.125s; }
h1 .amp b:nth-child(3) { animation-delay: 1.2s; }
h1 .amp b:nth-child(4) { animation-delay: 1.275s; }
h1 .amp b:nth-child(5) { animation-delay: 1.35s; }
h1:hover .amp b:nth-child(2) i { animation-delay: .045s; }
h1:hover .amp b:nth-child(3) i { animation-delay: .09s; }
h1:hover .amp b:nth-child(4) i { animation-delay: .135s; }
h1:hover .amp b:nth-child(5) i { animation-delay: .18s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(.12em); }
}
@keyframes amp {
  0% { opacity: 0; filter: blur(6px); transform: scaleY(.25) translateY(.15em); }
  40% { opacity: 1; filter: blur(1px); transform: scaleY(1.18); }
}
@keyframes pulse {
  40% { transform: scaleY(1.2); }
}

/* bio */

.bio p { color: var(--muted); max-width: 60ch; margin-bottom: 10px; }
.bio .lead { color: var(--text); }

h2 {
  font: 500 12.5px var(--mono);
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 24px 0 12px;
}

/* projects */

.projects {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 40px;
  max-width: 600px;
}
.projects a, .projects strong { font-weight: 500; }
.projects small { font: 11px var(--mono); color: var(--dim); margin-left: 4px; }
.projects span { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* contact */

.contact {
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  font-size: 15px;
  color: var(--muted);
}
.contact a { color: var(--text); }
.contact b { color: var(--text); font: 400 14px var(--mono); margin-left: 4px; }

/* portrait */

.portrait { position: relative; overflow: hidden; }
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 30%;
  animation: fade 1.2s ease .2s backwards;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(11, 11, 12, 0) 22%);
}
.portrait figcaption {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 1;
  font: 12px var(--mono);
  color: var(--dim);
}

@keyframes fade {
  from { opacity: 0; }
}

/* small screens */

@media (max-width: 760px) {
  .page { grid-template-columns: 1fr; }
  .portrait { order: -1; height: 62vh; min-height: 420px; }
  .portrait::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(11, 11, 12, 0) 35%); }
  .portrait figcaption { display: none; }
  .intro { padding: 0 20px 40px; }
  .top { display: none; }
  h1 { font-size: 58px; margin: -20px 0 20px; position: relative; z-index: 1; }
  .projects { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 404 */

.missing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px;
  max-width: 640px;
  margin: 0 auto;
}
.missing h1 i { color: var(--muted); }
.missing p { color: var(--muted); }
