@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/vt323-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/vt323-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/vt323-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-display: "VT323", monospace;
  --color-accent: #2fcbef;
  --color-accent-hover: #9a99ff;
  --color-white: #ffffff;
  --color-text: #e6db74;
  --color-bg: #000000;
  --color-border: rgba(255, 255, 255, 0.12);
  --content-max: 1260px;
  --hero-max: 1380px;
  --divider-max: 1770px;
  --desktop-gutter: 4%;
  --mobile-gutter: 8%;
  --section-padding: 10%;
}

html {
  box-sizing: border-box;
  font-size: 137.5%;
  scroll-behavior: smooth;
}

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

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  position: relative;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.08;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s linear;
}

a:hover,
a:focus {
  color: var(--color-accent-hover);
}

a:focus-visible,
button:focus-visible {
  outline: thin dotted currentColor;
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999em;
  top: -9999em;
  z-index: 100000;
  padding: 15px 23px 14px;
  background-color: #f1f1f1;
  color: #21759b;
  font-family: var(--font-display);
  font-size: 0.875rem;
  line-height: normal;
  text-decoration: none;
  box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
  left: 6px;
  top: 7px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#rain-lightning-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.ambient-controls {
  position: fixed;
  top: calc(22px + env(safe-area-inset-top, 0px));
  right: calc(24px + env(safe-area-inset-right, 0px));
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(15rem, calc(100vw - 20px));
}

.ambient-control {
  appearance: none;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.8);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 0.82rem;
  line-height: 1;
  min-width: 5.65rem;
  padding: 9px 12px 8px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.2s linear,
    border-color 0.2s linear,
    background-color 0.2s linear,
    opacity 0.2s linear;
}

.ambient-control:hover,
.ambient-control:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.ambient-control[data-active="false"] {
  color: var(--color-text);
  opacity: 0.7;
}

.site-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: transparent;
}

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

.site-main {
  flex: 1 0 auto;
}

.hero {
  margin-inline: var(--desktop-gutter);
}

.hero__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding-top: 210px;
  padding-right: var(--section-padding);
  padding-bottom: 0;
  padding-left: var(--section-padding);
}

.hero__title {
  margin-bottom: 0;
  color: var(--color-white);
  font-size: clamp(3.2rem, 12vw, 6.2rem);
  font-weight: 400;
  line-height: 0.8;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero-banner,
.visual-divider {
  position: relative;
  overflow: hidden;
}

.hero-banner::before,
.visual-divider::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 0, 46, 0.08), rgba(16, 0, 46, 0.08));
  opacity: 1;
}

.hero-banner {
  width: min(72vw, var(--hero-max));
  min-height: 0;
  aspect-ratio: 2.9 / 1;
  margin-top: 60px;
  margin-right: auto;
  margin-bottom: clamp(4rem, 6vw, 5.75rem);
  margin-left: auto;
  background-image: url("../images/banner.avif");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

.content-section {
  margin-inline: var(--desktop-gutter);
  position: relative;
}

.content-section__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.content-section--about .content-section__inner {
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 0;
}

.content-section--projects .content-section__inner {
  padding-top: clamp(5rem, 7vw, 6.5rem);
  padding-bottom: 0;
}

.content-section--contact .content-section__inner {
  padding-top: clamp(6rem, 9vw, 7.5rem);
  padding-right: 0;
  padding-bottom: clamp(7rem, 10vw, 8.5rem);
  padding-left: 0;
}

.section-marker {
  padding-bottom: 1.15rem;
  color: var(--color-accent-hover);
  font-size: 34px;
  line-height: 1;
  text-align: center;
}

.section-heading {
  width: min(100%, 40rem);
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 20px;
  color: var(--color-white);
  font-size: clamp(3rem, 10vw, 5.4rem);
  font-weight: 400;
  line-height: 0.8;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.section-heading p {
  margin-bottom: 15px;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.section-heading--about {
  width: min(100%, 41rem);
}

.section-heading--projects {
  width: min(100%, 43rem);
}

.section-heading--contact {
  width: min(100%, 42rem);
}

.section-heading--contact p {
  margin-bottom: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin-top: clamp(4rem, 6vw, 5.75rem);
}

.about-card {
  padding: 50px;
  border-top: 1px solid var(--color-border);
}

.about-card--lead {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-card--body {
  border-left: 1px solid var(--color-border);
}

.about-card--lead h5 {
  color: var(--color-white);
  font-size: clamp(1.55rem, 4.8vw, 34px);
  font-weight: 400;
  line-height: 1.12;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.about-card--body p {
  text-align: left;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.project-list {
  width: 100%;
  margin-top: clamp(4.25rem, 8vw, 7rem);
  margin-bottom: clamp(4.75rem, 8vw, 7.25rem);
}

.project-link {
  color: var(--color-accent);
  font-size: clamp(3rem, 10vw, 5.4rem);
  font-weight: 400;
  line-height: 0.92;
  text-align: center;
  overflow-wrap: anywhere;
}

.project-link a {
  display: inline-block;
  max-width: 100%;
}

.visual-divider {
  width: min(92vw, var(--divider-max));
  min-height: 0;
  aspect-ratio: 5 / 1;
  margin-right: auto;
  margin-left: auto;
  background-image: url("../images/retrorunner-divider.jpg");
  background-repeat: no-repeat;
  background-position: center 48%;
  background-size: cover;
  background-attachment: fixed;
}

.site-footer {
  margin-right: 0;
  margin-left: 0;
  padding: 28px 3.5% 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
}

.site-footer__column {
  display: flex;
  justify-content: center;
}

.site-footer__column:last-child {
  justify-content: flex-end;
}

.site-footer__column p {
  margin: 0;
}

.site-footer__copyright span {
  font-size: 14pt;
}

#rain-audio {
  display: none;
}

@media (max-width: 976px) {
  .hero__inner {
    min-height: 0;
    padding-top: 20%;
    padding-right: 0;
    padding-bottom: 5%;
    padding-left: 0;
  }

  .hero__title {
    font-size: 61px;
  }

  .hero-banner {
    width: 100%;
    aspect-ratio: 2.45 / 1;
    min-height: 260px;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    background-image: url("../images/banner.avif");
    background-position: center center;
    background-attachment: scroll;
  }

  .content-section--about .content-section__inner {
    padding-top: 80px;
    padding-right: 0;
    padding-bottom: 62px;
    padding-left: 0;
  }

  .section-heading--about {
    width: min(100%, 33rem);
  }

  .about-card {
    padding: 30px;
  }

  .content-section--projects .content-section__inner {
    padding-top: 30px;
    padding-bottom: 92px;
  }

  .section-heading--projects {
    width: min(100%, 34rem);
  }

  .visual-divider {
    width: 100%;
    aspect-ratio: auto;
    margin-inline: 0;
    padding-top: 12%;
    padding-bottom: 0;
    background-image: url("../images/retrorunner-divider.jpg");
    background-attachment: scroll;
  }

  .content-section--contact .content-section__inner {
    padding-top: 80px;
    padding-right: 0;
    padding-bottom: 80px;
    padding-left: 0;
  }
}

@media (max-width: 767px) {
  .ambient-controls {
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: calc(14px + env(safe-area-inset-right, 0px));
    gap: 6px;
    max-width: calc(100vw - 20px);
  }

  .ambient-control {
    font-size: 0.72rem;
    padding: 8px 10px 7px;
  }

  .hero {
    margin-inline: var(--mobile-gutter);
  }

  .hero__inner {
    min-height: 100px;
    padding-top: 40%;
  }

  .hero__title {
    padding-bottom: 30px;
    font-size: 51px;
  }

  .hero-banner {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    aspect-ratio: 2 / 1;
    min-height: 180px;
    padding: 0;
    background-image: url("../images/banner.avif");
    background-position: center center;
    background-size: cover;
  }

  .content-section {
    margin-inline: var(--mobile-gutter);
  }

  .content-section--about .content-section__inner {
    padding-top: 16%;
    padding-bottom: 8%;
  }

  .section-heading--about {
    width: min(100%, 25rem);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    padding: 30px;
  }

  .about-card--lead {
    justify-content: flex-start;
  }

  .about-card--lead h5 {
    font-size: 27px;
    text-align: left;
  }

  .about-card--body {
    border-left: 0;
    padding-top: 30px;
    padding-bottom: 0;
  }

  .content-section--projects {
    margin-inline: max(20px, 8vw);
  }

  .content-section--projects .content-section__inner {
    padding-top: 16%;
    padding-bottom: 24%;
  }

  .section-heading--projects {
    width: min(100%, 26rem);
  }

  .project-link {
    padding-right: 20px;
    padding-left: 20px;
  }

  .visual-divider {
    min-height: 226px;
    width: 100%;
    margin-inline: var(--mobile-gutter);
    aspect-ratio: auto;
    padding-top: 12px;
    padding-bottom: 0;
    background-image: url("../images/retrorunner-divider.jpg");
    background-position: 100% 50%;
    background-size: cover;
  }

  .content-section--contact .content-section__inner {
    padding-top: 24%;
    padding-bottom: 16%;
  }

  .section-heading--contact {
    width: min(100%, 25rem);
  }

  .section-heading--contact p {
    margin-bottom: 20px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__column:last-child {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .hero {
    margin-inline: 5%;
  }

  .content-section,
  .content-section--projects {
    margin-inline: max(18px, 5vw);
  }

  .section-marker {
    font-size: 28px;
  }

  .section-heading p {
    font-size: 0.95rem;
  }

  .about-card {
    padding: 22px;
  }

  .about-card--body {
    padding-top: 22px;
  }

  .visual-divider {
    margin-inline: 5%;
  }
}

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

  a,
  button {
    transition: none;
  }
}
