:root {
  --ink: #010202;
  --charcoal: #38393c;
  --cyan: #00d8d8;
  --cyan-deep: #00b0b0;
  --white: #ffffff;
  --chip: #abd5d5;
  --yellow: #ffe152;
  --content: 980px;
  --content-wide: min(1240px, calc(100vw - 48px));
  --header: 148px;
  --font-display: "League Spartan", "Arial Narrow", Impact, sans-serif;
  --font-body: "Nunito Sans", "Avenir Next", "Segoe UI", sans-serif;
  --font-nav: "Open Sans", "Segoe UI", sans-serif;

  /* Typography scale — change sizes here to update the whole site. */
  --font-size-title-1: clamp(49.5px, 6.75vw, 81px);
  --font-size-title-2: 46.25px;
  --font-size-text-1: 27.5px;
  --font-size-text-2: 22.5px;
  --font-size-text-3: 17.5px;
  --font-size-text-4: 20px;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--font-size-text-4);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--cyan);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  background: var(--ink);
  text-align: center;
  padding: 28px 20px 18px;
}

.logo {
  display: inline-block;
  color: var(--cyan);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--font-size-text-1);
  line-height: 1.25;
  text-decoration: none;
}

.logo:hover,
.logo:focus-visible {
  color: var(--white);
}

.header-rule {
  width: min(940px, 100%);
  height: 1px;
  margin: 18px auto 10px;
  background: rgba(0, 216, 216, 0.85);
  border: 0;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-burger {
  display: none;
}

.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 8px 0 6px;
}

.site-nav a {
  color: var(--white);
  font-family: var(--font-nav);
  font-size: var(--font-size-text-3);
  line-height: 1.43;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--cyan);
}

.parallax {
  position: relative;
  overflow: clip;
  isolation: isolate;
}

.parallax-bg {
  position: absolute;
  z-index: 0;
  left: 0;
  width: 100%;
  top: -50vh;
  height: calc(100% + 100vh);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  will-change: transform;
}

.parallax > :not(.parallax-bg) {
  position: relative;
  z-index: 1;
}

.hero {
  --hero-crop: 0.18;
  position: relative;
  min-height: min(calc(100vh - var(--header)), calc(100vw * 1350 / 1080));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 20px;
  text-align: center;
}

.hero .parallax-bg {
  top: calc(var(--hero-crop) * -100vw * 1350 / 1080);
  height: auto;
  aspect-ratio: auto;
  background: none;
  display: flex;
  flex-direction: column;
}

.hero .parallax-bg img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  padding: 24px 0 38px;
}

.hero-inner::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  width: 100vw;
  top: 0;
  bottom: 0;
  background: rgba(1, 2, 2, 0.42);
  transform: translateX(-50%);
}

.eyebrow {
  margin: 0 0 14px;
  font-style: italic;
  font-weight: 800;
  font-size: var(--font-size-text-1);
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero .eyebrow {
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-title-1);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.hero .lede {
  margin-bottom: 20px;
  max-width: 920px;
  font-size: var(--font-size-text-2);
  line-height: 1.55;
}

.lede {
  margin: 0 auto 36px;
  max-width: 860px;
  font-style: italic;
  font-size: var(--font-size-text-2);
  font-weight: 300;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 8px 18px;
  border: 0;
  border-radius: 0;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--font-size-text-3);
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.btn:hover,
.btn:focus-visible {
  background: rgba(0, 216, 216, 0.72);
}

.btn-dark {
  min-height: 32px;
  padding: 6px 14px;
  background: var(--ink);
  color: var(--cyan);
  font-size: var(--font-size-text-3);
}

.btn-dark:hover,
.btn-dark:focus-visible {
  background: rgba(1, 2, 2, 0.72);
  color: var(--white);
}

.btn-black {
  background: var(--ink);
  color: var(--white);
}

.btn-black:hover,
.btn-black:focus-visible {
  background: rgba(1, 2, 2, 0.72);
  color: var(--cyan);
}

.btn-light {
  background: var(--white);
  color: var(--ink);
}

.btn-light:hover,
.btn-light:focus-visible {
  background: rgba(255, 255, 255, 0.78);
}

.section {
  padding: 72px 20px;
}

.section-cyan {
  background: var(--cyan);
  color: var(--ink);
}

.section-charcoal {
  background: var(--charcoal);
  color: var(--white);
}

.section-ink {
  background: var(--ink);
  color: var(--white);
}

.section.parallax {
  background: transparent;
}

.section .parallax-bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.section-charcoal.parallax .parallax-bg::after {
  background: var(--charcoal);
  opacity: 0.72;
}

.section-cyan.parallax .parallax-bg::after {
  background: var(--cyan);
  opacity: 0.74;
}

.section-ink.parallax .parallax-bg::after {
  background: var(--ink);
  opacity: 0.74;
}

.section-graphics .parallax-bg { background-image: url("../assets/images/graphics.jpg"); }
.section-physics .parallax-bg { background-image: url("../assets/images/physics.jpg"); }
.section-elbloob .parallax-bg { background-image: url("../assets/images/elbloob.png"); }
.section-vindolanda .parallax-bg { background-image: url("../assets/images/vindolanda.png"); }
.section-godot {
  color: var(--white);
}

.section-godot .parallax-bg {
  background-color: #2f3a63;
  background-image: url("../assets/images/godot-emblem.png");
  background-size: min(72vmin, 640px);
  background-repeat: no-repeat;
  background-position: center calc(50% - 250px);
}

.section-godot.section-cyan.parallax .parallax-bg::after {
  background: rgba(24, 30, 52, 0.55);
  opacity: 1;
}

.section-unreal .parallax-bg {
  background-image: url("../assets/images/ue-emblem.jpg");
  background-size: cover;
  background-position: center calc(50% + 25px);
}

.section-unreal.section-charcoal.parallax .parallax-bg::after {
  background: var(--charcoal);
  opacity: 0.48;
}

.section-unreal.section-ink.parallax .parallax-bg::after {
  background: var(--ink);
  opacity: 0.42;
}

.wrap {
  width: min(var(--content), 100%);
  margin: 0 auto;
}

.wrap.split,
.wrap.stack,
.wrap.two-col,
.wrap.button-cluster,
.wrap.jobs-cols,
.jobs .wrap {
  width: var(--content-wide);
}

.section-title {
  margin: 0 0 48px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-title-1);
  line-height: 1.25;
  text-align: center;
}

#projects {
  /* Slightly darker than .btn (var(--cyan)); shows at section start and end. */
  --project-canvas: var(--cyan-deep);
  --project-band-dark: #003f3f;
  --project-band-light: #0a7c7c;
  padding: 6px 0 40px;
  background: var(--project-canvas);
}

#projects .wrap {
  width: 100%;
  max-width: none;
}

#projects .section-title {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  min-height: 56px;
  /* Top space above the label is half the previous amount. */
  padding: 15px 20px 4px;
  background: color-mix(in srgb, var(--project-canvas) 55%, transparent);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-title-1);
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 32px clamp(20px, 5vw, 72px);
  background: var(--project-band-dark);
  color: var(--white);
}

.project:nth-of-type(even) {
  background: var(--project-band-light);
}

.project img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}

.project h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-title-2);
  line-height: 1.2;
  color: var(--white);
}

.project p {
  margin: 0 0 26px;
  font-size: var(--font-size-text-2);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

#projects .btn-dark {
  min-height: 37px;
  padding: 7px 16px;
  font-size: calc(var(--font-size-text-3) * 1.15);
}

.contact {
  /* One full-width banner, cropped shorter than the image so parallax has room without tiling. */
  --contact-crop: 0.5;
  --contact-image-height: calc(100vw * 738 / 1920);
  position: relative;
  min-height: calc(var(--contact-image-height) * (1 - var(--contact-crop)));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--ink);
}

.contact .parallax-bg {
  /* Center the crop so spare above/below is equal; never stack a second copy. */
  top: calc(var(--contact-image-height) * var(--contact-crop) * -0.5);
  height: auto;
  background: none;
}

.contact .parallax-bg img {
  display: block;
  width: 100%;
  height: auto;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(920px, 100%);
}

.contact h2,
.contact p {
  display: inline-block;
  margin: 0;
  padding: 4px 12px;
}

.contact h2 {
  background: var(--ink);
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-title-1);
  line-height: 1.2;
}

.contact p {
  background: var(--chip);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--font-size-text-2);
  line-height: 1.45;
}

.contact a {
  color: var(--ink);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
}

.socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--white);
}

.socials svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 22px 20px 28px;
  font-family: var(--font-nav);
  font-size: var(--font-size-text-3);
  line-height: 1.43;
}

.site-footer p {
  width: min(var(--content), 100%);
  margin: 0 auto;
}

.site-version {
  margin-left: 0.75em;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: stretch;
}

.split .copy {
  text-align: center;
  min-width: 0;
}

.split .copy p {
  width: 100%;
  max-width: none;
}

.split h1,
.split h2.display,
.stack h1,
.stack h2.display {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-title-2);
  line-height: 1.2;
}

.subhead {
  margin: 0 0 18px;
  font-weight: 800;
  font-size: var(--font-size-text-1);
  line-height: 1.25;
}

.copy p,
.stack p {
  margin: 0 0 16px;
}

.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.split .video {
  aspect-ratio: auto;
  height: 100%;
  min-height: clamp(260px, 32vw, 480px);
  align-self: stretch;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stack {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.stack .video,
.stack + .video,
.video-block {
  width: 100%;
  max-width: min(1100px, 100%);
  margin: 28px auto 0;
  aspect-ratio: 16 / 9;
}

.video.playable {
  max-width: min(900px, 100%);
  aspect-ratio: 16 / 10;
  min-height: 420px;
  border: 2px solid rgba(1, 2, 2, 0.35);
  margin-bottom: 36px;
}

.play-actions {
  margin: 0;
}

.btn-play {
  min-height: 52px;
  padding: 10px 28px;
}

.stack ul,
.job ul,
.plain-list {
  text-align: left;
  margin: 12px auto 20px;
  padding-left: 1.2em;
}

.stack li + li,
.job li + li {
  margin-top: 8px;
}

.button-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.banner {
  position: relative;
  min-height: 440px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 20px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #010202;
  opacity: 0.32;
}

.banner.bare::before {
  opacity: 0;
}

.banner .banner-inner {
  position: absolute;
  left: 50%;
  top: 66%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: max-content;
  max-width: calc(100% - 40px);
}

.banner h1,
.banner h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-title-1);
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.banner p {
  margin: 10px 0 0;
  font-weight: 800;
  font-size: var(--font-size-text-1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.banner.parallax::before {
  content: none;
}

.banner .parallax-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #010202;
  opacity: 0.32;
}

.banner.bare .parallax-bg::after {
  opacity: 0;
}

.banner-work .parallax-bg { background-image: url("../assets/images/cv-work.jpg"); }
.banner-edu {
  min-height: 528px;
}

.banner-edu .parallax-bg {
  background-image: url("../assets/images/cv-edu.jpg");
  top: calc(-50vh - 200px);
}
.banner-skills .parallax-bg { background-image: url("../assets/images/cv-skills.jpg"); }
.banner-activities .parallax-bg { background-image: url("../assets/images/cv-activities.jpg"); }

.banner-edu h1 {
  color: var(--cyan);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.banner-skills h1 {
  color: var(--cyan);
}

.jobs {
  padding: 56px 20px 72px;
}

.wrap.jobs-cols {
  width: min(1680px, calc(100vw - 48px));
}

.jobs-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 40px clamp(40px, 4.5vw, 72px);
  align-items: start;
}

.jobs-cols .job + .job {
  margin-top: 0;
}

.job + .job {
  margin-top: 42px;
}

.job h2,
.job h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-title-2);
  line-height: 1.25;
}

.job .when,
.job .game {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: var(--font-size-text-1);
  line-height: 1.25;
}

.job .game {
  font-size: var(--font-size-text-2);
  margin-bottom: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.two-col h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-title-2);
  line-height: 1.25;
}

.section-cyan a:not(.btn) {
  color: var(--ink);
}

.ink-title {
  color: var(--cyan);
}

.pdf-banner {
  min-height: 289px;
}

/* Continue the Activities image lower in frame so the two banners don't match. */
.pdf-banner .parallax-bg {
  top: calc(-50vh - 105px);
}

.btn-pdf {
  min-height: 52px;
  padding: 8px 28px;
  border: 3px solid #000;
  border-radius: 5px;
  background: var(--yellow);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: var(--font-size-text-1);
  box-shadow: 0 3px 0 rgba(255, 140, 98, 0.35);
}

.btn-pdf:hover,
.btn-pdf:focus-visible {
  background: var(--ink);
  color: var(--yellow);
  border-color: var(--yellow);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  .wrap.split,
  .wrap.stack,
  .wrap.two-col,
  .wrap.button-cluster,
  .wrap.jobs-cols,
  .jobs .wrap {
    width: min(100%, calc(100vw - 32px));
  }

  .split,
  .two-col {
    grid-template-columns: 1fr;
  }

  .split .video {
    order: -1;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 860px) {
  :root {
    --font-size-title-1: 54px;
    --font-size-title-2: 37.5px;
    --font-size-text-1: 25px;
    --font-size-text-2: 20px;
    --font-size-text-3: 17.5px;
    --font-size-text-4: 18.75px;
  }

  .hero {
    --hero-crop: 0;
    min-height: 82vh;
  }

  .hero .parallax-bg {
    top: 0;
    height: 100%;
  }

  .hero .parallax-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 34%;
  }

  .hero .parallax-bg img + img {
    display: none;
  }

  .contact {
    --contact-crop: 0.35;
    min-height: 360px;
  }

  .contact .parallax-bg {
    top: calc(var(--contact-image-height) * var(--contact-crop) * -0.5);
    height: auto;
  }

  .contact .parallax-bg img {
    width: 100%;
    height: auto;
  }

  .contact-inner {
    gap: 16px;
  }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    margin-top: 8px;
    cursor: pointer;
  }

.nav-burger span,
.nav-burger::before,
.nav-burger::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cyan);
}

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 12px 0 4px;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .nav-toggle:checked + .nav-burger span {
    opacity: 0;
  }

  .nav-toggle:checked + .nav-burger::before {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle:checked + .nav-burger::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .wrap.split,
  .wrap.stack,
  .wrap.two-col,
  .wrap.button-cluster,
  .wrap.jobs-cols,
  .jobs .wrap {
    width: min(100%, calc(100vw - 32px));
  }

  .jobs-cols {
    grid-template-columns: 1fr;
  }

  .button-cluster {
    flex-direction: column;
    align-items: center;
  }

  /* Slot UI needs desktop width; open fullscreen on phone instead. */
  .video.playable {
    display: none;
  }

  .btn-play {
    width: min(100%, 320px);
    min-height: 56px;
    font-size: var(--font-size-text-2);
  }

  .project {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 20px;
  }
}
