@font-face {
  font-family: Manrope;
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #090d0b;
  --text: #eef4ef;
  --muted: #a9b6ac;
  --quiet: #78877c;
  --line: #304036;
  --accent: #a6d8ae;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(ellipse at 50% 45%, #111b14 0, var(--bg) 57%);
  color: var(--text);
  font: 400 1rem/1.6 Manrope, sans-serif;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-underline-offset: .25em; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: .35rem;
  border-radius: .15rem;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: .75rem;
  left: .75rem;
  padding: .65rem 1rem;
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--bg);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  display: flex;
  width: min(100%, 96rem);
  height: 5.5rem;
  margin-inline: auto;
  padding-inline: var(--pad);
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  gap: .7rem;
  align-items: center;
  font-size: .87rem;
  font-weight: 700;
  text-decoration: none;
}

.wordmark span { color: var(--accent); font-family: "IBM Plex Mono", monospace; }

nav { display: flex; gap: 2rem; align-items: center; }

nav a {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

nav a:hover { color: var(--text); }

.nav-cv {
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.landing {
  position: relative;
  display: grid;
  width: min(100%, 96rem);
  min-height: 100dvh;
  margin-inline: auto;
  padding: 6rem var(--pad) 3rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(16rem, .86fr);
  align-items: start;
  align-content: center;
  gap: clamp(1rem, 2vw, 2rem);
  isolation: isolate;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.projects h2,
.project-kind,
.project-note,
.credentials {
  font-family: "IBM Plex Mono", monospace;
}

.eyebrow {
  margin: 0 0 1.8rem;
  color: var(--accent);
  font-size: .875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 1.6rem;
  font-size: clamp(2.5rem, 3.5vw, 4.3rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.03;
  white-space: nowrap;
}

.intro {
  max-width: 28rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  line-height: 1.7;
}

.primary-link {
  display: inline-flex;
  min-height: 3rem;
  padding: .7rem 1.1rem;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #0d1b10;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.primary-link:hover { background: #c0e8c6; transform: translateY(-2px); }
.primary-link:active { transform: translateY(0); }

.credentials {
  margin: clamp(2.5rem, 9vh, 6rem) 0 0;
  color: var(--quiet);
  font-size: .875rem;
  line-height: 1.9;
}

.portrait-stage {
  position: relative;
  z-index: 0;
  width: min(100%, 32rem, 63dvh);
  aspect-ratio: 1029 / 1280;
  justify-self: center;
  isolation: isolate;
}

#code-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#code-portrait {
  display: block;
  opacity: 0;
  transition: opacity 700ms ease;
}

.portrait-ready #code-portrait { opacity: 1; }

.projects {
  position: relative;
  z-index: 2;
}

.projects h2 {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.2rem;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.projects h2 span { color: var(--quiet); }

.project {
  padding: 1.35rem 0 1.6rem;
  border-top: 1px solid var(--line);
}

.project-kind {
  margin-bottom: .85rem;
  color: var(--quiet);
  font-size: .875rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.project h3 {
  margin-bottom: .85rem;
  font-size: clamp(1.8rem, 2.4vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.05;
}

.project > p:not(.project-kind) {
  max-width: 22rem;
  margin-bottom: .9rem;
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.65;
}

.project a {
  color: var(--accent);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}

.project a:hover { text-decoration: underline; }
.project a span { margin-left: .4rem; }
.project .project-note { color: var(--quiet) !important; font-size: .875rem !important; }

@media (max-width: 70rem) {
  .landing {
    min-height: auto;
    padding-top: 8rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
  }

  .hero-copy { align-self: center; padding-bottom: 0; }
  h1 { font-size: clamp(2.5rem, 4.5vw, 3.6rem); }
  .portrait-stage { width: min(100%, 30rem); }
  .projects { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
  .projects h2 { grid-column: 1 / -1; }
}

@media (max-width: 43rem) {
  .site-header { height: 4rem; }
  .wordmark { font-size: .78rem; }
  .wordmark span { display: none; }
  nav { gap: 1rem; }
  nav a:first-child { display: none; }

  .landing {
    display: flex;
    padding-top: 4.75rem;
    padding-bottom: 3rem;
    align-items: center;
    flex-direction: column;
    gap: 0;
  }

  .portrait-stage { order: 0; width: min(100%, 25rem); }
  .hero-copy { order: 1; width: 100%; margin-top: -3.25rem; }
  .eyebrow { margin-bottom: 1rem; }
  h1 { font-size: clamp(2.3rem, 9vw, 3.25rem); white-space: normal; }
  .intro { font-size: .95rem; }
  .credentials { margin-top: 2.25rem; }

  .projects {
    display: block;
    order: 2;
    width: 100%;
    margin-top: 4rem;
  }

  .projects h2 { margin-bottom: 1.5rem; }
  .project { padding-block: 1.45rem; }
  .project h3 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
