:root {
  --bg: #080808;
  --surface: #0d0d0c;
  --surface-raised: #11110f;
  --fg: #f2f2f0;
  --muted: #8f8f8b;
  --muted-bright: #b8b8b2;
  --line: #20201e;
  --line-bright: #353531;
  --accent: #e02010;
  --pad: clamp(1rem, 4vw, 4rem);
  --max: 1440px;
  --header-h: 4.5rem;
  --serif: "Instrument Serif", "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: "Instrument Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-sans: var(--sans);
  --font-mono: var(--mono);
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scrollbar-color: var(--fg) var(--bg);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--fg);
  color: var(--bg);
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

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

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 5000;
  width: 100%;
  height: 3px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--fg);
}

.site-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, transparent calc(25% - 1px), rgba(255, 255, 255, 0.025) 25%, transparent calc(25% + 1px)),
    linear-gradient(to right, transparent calc(50% - 1px), rgba(255, 255, 255, 0.025) 50%, transparent calc(50% + 1px)),
    linear-gradient(to right, transparent calc(75% - 1px), rgba(255, 255, 255, 0.025) 75%, transparent calc(75% + 1px));
}

main {
  position: relative;
  z-index: 1;
}

.about-section::after,
.stack-section::after,
.projects-section::after,
.journey-section::after,
.contact-section::after {
  --section-guide-color: color-mix(in srgb, var(--line, #20201e) 72%, transparent);
  --section-guide-half: .5px;
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent calc(25% - var(--section-guide-half)),
    var(--section-guide-color) calc(25% - var(--section-guide-half)) calc(25% + var(--section-guide-half)),
    transparent calc(25% + var(--section-guide-half)) calc(50% - var(--section-guide-half)),
    var(--section-guide-color) calc(50% - var(--section-guide-half)) calc(50% + var(--section-guide-half)),
    transparent calc(50% + var(--section-guide-half)) calc(75% - var(--section-guide-half)),
    var(--section-guide-color) calc(75% - var(--section-guide-half)) calc(75% + var(--section-guide-half)),
    transparent calc(75% + var(--section-guide-half)));
}

@media (min-width: 1600px) {
  .about-section::after,
  .stack-section::after,
  .projects-section::after,
  .journey-section::after,
  .contact-section::after {
    --section-guide-color: color-mix(in srgb, var(--line, #20201e) 88%, transparent);
    --section-guide-half: 1px;
  }
}

.section-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding-inline: var(--pad);
}

.section-kicker {
  margin: 0 0 1.2rem;
  color: var(--muted-bright);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-heading {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.4rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.88;
  text-transform: uppercase;
}

.serif-em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 2.8rem, 0);
  filter: blur(7px);
  transition:
    opacity 760ms cubic-bezier(0.2, 0.75, 0.25, 1),
    transform 920ms cubic-bezier(0.2, 0.75, 0.25, 1),
    filter 760ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal="left"] {
  transform: translate3d(-4rem, 0, 0);
}

[data-reveal="right"] {
  transform: translate3d(4rem, 0, 0);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 6000;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--fg);
  mix-blend-mode: difference;
}

.cursor-ring {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(242, 242, 240, 0.45);
  color: var(--fg);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  transition: width 180ms ease, height 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.cursor-ring.is-active {
  width: 64px;
  height: 64px;
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

@media (hover: hover) and (pointer: fine) {
  body,
  a,
  button {
    cursor: none;
  }

  .cursor-dot,
  .cursor-ring {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 4rem;
  }

  .site-grid {
    display: none;
  }

  .section-heading {
    font-size: clamp(2.7rem, 13vw, 4.6rem);
  }

  .about-section::after,
  .stack-section::after,
  .projects-section::after,
  .journey-section::after,
  .contact-section::after {
    background: linear-gradient(90deg,
      transparent calc(50% - var(--section-guide-half)),
      var(--section-guide-color) calc(50% - var(--section-guide-half)) calc(50% + var(--section-guide-half)),
      transparent calc(50% + var(--section-guide-half)));
  }

}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
