html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@keyframes jumpInfinite {
  0% {
    margin-top: 0;
  }
  50% {
    margin-top: 20px;
  }
  100% {
    margin-top: 0;
  }
}

.down-arrow {
  position: absolute;
  top: calc(100vh - 60px);
  left: calc(50% - 14px);
  width: 0;
  height: 30px;
  border: 2px solid;
  border-radius: 2px;
  animation: jumpInfinite 1.5s infinite;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s ease-in;
}
/* arrow appears only after entering, then fades out once you scroll */
.entered .down-arrow { opacity: 1; }
.entered.unlocked .down-arrow { opacity: 0; }

.down-arrow:after {
  content: " ";
  position: absolute;
  top: 12px;
  left: -10px;
  width: 16px;
  height: 16px;
  border-bottom: 4px solid;
  border-right: 4px solid;
  border-radius: 4px;
  transform: rotateZ(45deg);
}

body:not(.entered) {
  overflow: hidden;
  height: 100vh;
}
/* after entering, stay locked on the hero until the first scroll unlocks it */
body.entered:not(.unlocked) {
  overflow: hidden;
  height: 100vh;
}
body:not(.entered) .page {
  visibility: hidden;
}
/* portfolio isn't available at all until you scroll (unlock) */
body:not(.unlocked) .reveal,
body:not(.unlocked) .foot {
  visibility: hidden;
}


.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(24px);
  transform: scale(1.08);
  transition: opacity 1.2s ease-in, filter 1.2s ease-out, transform 1.2s ease-out;
  z-index: -2;
}
.bg.ready { opacity: 1; }
.entered .bg { filter: blur(0); transform: scale(1); }
.entered.scrolled .bg { filter: blur(22px) brightness(.5); transform: scale(1.04); }


.gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .9);
  cursor: pointer;
  z-index: 5;
  transition: opacity .5s ease-out;
  animation: pulse 2.4s ease-in-out infinite;
}
.entered .gate { opacity: 0; pointer-events: none; animation: none; }
@keyframes pulse {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}


.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s ease-in;
}
.entered main { opacity: 1; pointer-events: auto; }

.btn {
  position: relative;
  min-width: 240px;
  padding: 14px 28px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .92);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, calc(.18 + var(--m, 0) * .5));
  border-radius: 999px;
  text-decoration: none;
  transform: translateY(calc(var(--m, 0) * -3px));
  box-shadow:
    0 4px 24px rgba(0, 0, 0, .12),
    0 0 calc(var(--m, 0) * 28px) rgba(255, 255, 255, calc(var(--m, 0) * .35));
  transition: transform .15s ease-out, border-color .25s;
  z-index: 0;
  isolation: isolate;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  background: rgba(255, 255, 255, .08);
  -webkit-mask-image: var(--mask, linear-gradient(transparent, transparent));
  mask-image: var(--mask, linear-gradient(transparent, transparent));
  pointer-events: none;
  z-index: -1;
}
.btn:hover {
  border-color: rgba(255, 255, 255, calc(.32 + var(--m, 0) * .5));
  transform: translateY(calc(-2px + var(--m, 0) * -3px));
}



.page {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 28px;
  z-index: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}
.reveal.show { opacity: 1; transform: translateY(0); }

/* hi, i'm kyler. owo so cool */
.hello {
  font-size: clamp(56px, 11vw, 128px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: .95;
  margin: 0 0 32px;
  color: #fff;
}
.hello-name {
  display: inline-block;
  position: relative;
  padding-bottom: 4px;
}
.hello-name::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #fff;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(.22, 1, .36, 1) .4s;
}
.reveal.show .hello-name::after { transform: scaleX(1); }

.hello-line {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 400;
  color: rgba(255, 255, 255, .82);
  margin: 0 0 14px;
  max-width: 30em;
  line-height: 1.5;
}
.hello-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, .48);
  margin: 0;
  max-width: 32em;
  line-height: 1.6;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  margin: 0 0 48px;
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .12);
}

/* projects */
.proj {
  padding: 32px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.proj:first-of-type { padding-top: 0; }
.proj:last-of-type { border-bottom: 0; padding-bottom: 0; }
.proj-meta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  margin: 0 0 14px;
  display: flex;
  gap: 14px;
}
.proj-tag {
  position: relative;
  padding-left: 14px;
  color: rgba(255, 255, 255, .85);
}
.proj-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}
.proj-title {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
}
.proj-title a {
  color: inherit;
  text-decoration: none;
  position: relative;
  display: inline-block;
}
.proj-title a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: #fff;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.proj-title a:hover::after {
  transform-origin: left;
  transform: scaleX(1);
}
/*
.dot { color: rgba(255, 255, 255, .35); }
*/
.proj-body {
  font-size: 15px;
  color: rgba(255, 255, 255, .7);
  margin: 0 0 18px;
  max-width: 42em;
  line-height: 1.6;
}
.proj-link a {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
  transition: color .2s, border-color .2s, letter-spacing .2s;
}
.proj-link a:hover {
  color: #fff;
  border-bottom-color: #fff;
  letter-spacing: .14em;
}

.stack-list, .now-list, .contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}
.stack-list li, .contact-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
  align-items: baseline;
  font-size: 15px;
  color: rgba(255, 255, 255, .78);
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.stack-list li:first-child, .contact-list li:first-child { padding-top: 0; }
.stack-list li:last-child, .contact-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.key {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.now-list {
  gap: 14px;
}
.now-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 18px;
  font-weight: 400;
  color: rgba(255, 255, 255, .92);
  line-height: 1.5;
  max-width: 38em;
}
.dash {
  color: rgba(255, 255, 255, .4);
  font-weight: 400;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
  position: relative;
  display: inline-block;
}
.contact-list a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: rgba(255, 255, 255, .8);
  transform-origin: right;
  transform: scaleX(0);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.contact-list a:hover { color: #fff; }
.contact-list a:hover::after {
  transform-origin: left;
  transform: scaleX(1);
}

.foot-note {
  margin: 36px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, .45);
  letter-spacing: .02em;
}
.foot-note a {
  color: rgba(255, 255, 255, .7);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.foot-note a:hover { color: #fff; border-bottom-color: #fff; }

/* footer */
.foot {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 28px 96px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  position: relative;
  z-index: 1;
}
.foot-line {
  font-size: 13px;
  margin: 0 0 8px;
  font-style: italic;
  color: rgba(255, 255, 255, .8);
  letter-spacing: .01em;
}
.foot-line.muted {
  color: rgba(255, 255, 255, .4);
  font-style: normal;
  font-size: 12px;
  letter-spacing: .03em;
}

/* loader (outbound nav wave) */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(8, 12, 20, .62);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .22s ease-out;
  pointer-events: none;
}
#loader.show { opacity: 1; }
#loader span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  animation: wave 1.1s ease-in-out infinite;
}
#loader span:nth-child(2) { animation-delay: .16s; }
#loader span:nth-child(3) { animation-delay: .32s; }
@keyframes wave {
  0%, 60%, 100% { transform: translateY(0); }
  30%          { transform: translateY(-14px); }
}

/* mobile */
@media (max-width: 560px) {
  .page, .foot { padding-left: 22px; padding-right: 22px; }
  .page { padding-top: 80px; padding-bottom: 80px; }
  .stack-list li, .contact-list li {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 0;
  }
  .key { margin-bottom: 2px; }
}
