/* kaylee bio — real photo, normal cursor, aligned layout */

:root {
  --bg: #070709;
  --ink: #f2ebe0;
  --ink-dim: rgba(242, 235, 224, 0.62);
  --ink-faint: rgba(242, 235, 224, 0.38);
  --amber: #e8b86a;
  --line: rgba(242, 235, 224, 0.12);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 4.75rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 68rem;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 184, 106, 0.35) transparent;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--amber);
}

::selection {
  background: rgba(232, 184, 106, 0.35);
  color: #fff;
}

/* layers */

.grain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, transparent 45%, rgba(0, 0, 0, 0.45) 100%);
}

/* nav — one horizontal line */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  mix-blend-mode: difference;
  transition: background 0.45s var(--ease), backdrop-filter 0.45s, mix-blend-mode 0.35s;
}

.nav.is-solid {
  mix-blend-mode: normal;
  background: rgba(7, 7, 9, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav__logo {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  line-height: 1;
  letter-spacing: -0.02em;
  transition: opacity 0.3s, transform 0.45s var(--ease);
}

.nav__logo:hover {
  opacity: 0.75;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.5vw, 2rem);
}

.nav__links a {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1;
  padding: 0.4rem 0;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.45s var(--ease);
}

.nav__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ---------- HERO: title + aside on SAME baseline ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--gutter) clamp(2.5rem, 6vh, 4rem);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  will-change: transform;
}

.hero__video,
.hero__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  filter: saturate(1.06) contrast(1.05) brightness(0.88);
}

.hero__video {
  z-index: 1;
  opacity: 0;
  /* long soft dissolve — hides the loop seam */
  transition: opacity 2.8s cubic-bezier(0.45, 0, 0.2, 1);
  pointer-events: none;
}

.hero__video.is-active {
  opacity: 1;
  z-index: 2;
}

/* soft mid-dissolve dim — peaks once, hides the loop join */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: rgba(7, 7, 9, 0.28);
  opacity: 0;
}

.hero__bg.is-fading::after {
  animation: loop-veil 2.8s cubic-bezier(0.45, 0, 0.2, 1) both;
}

@keyframes loop-veil {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  100% { opacity: 0; }
}

.hero__fallback {
  z-index: 0;
  transition: opacity 0.8s ease;
}

.hero__bg.has-video .hero__fallback {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none;
  }
  .hero__bg.has-video .hero__fallback {
    opacity: 1;
  }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  /* vertical: top + bottom into page bg */
  background:
    linear-gradient(
      180deg,
      rgba(7, 7, 9, 0.55) 0%,
      transparent 28%,
      transparent 48%,
      rgba(7, 7, 9, 0.5) 72%,
      rgba(7, 7, 9, 0.98) 100%
    );
}

/* stronger side fade on X — video dissolves into dark at edges */
.hero__fade-x {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(7, 7, 9, 0.92) 0%,
    rgba(7, 7, 9, 0.55) 12%,
    rgba(7, 7, 9, 0.12) 28%,
    transparent 42%,
    transparent 58%,
    rgba(7, 7, 9, 0.12) 72%,
    rgba(7, 7, 9, 0.55) 88%,
    rgba(7, 7, 9, 0.92) 100%
  );
}

@media (max-width: 800px) {
  .hero__fade-x {
    background: linear-gradient(
      90deg,
      rgba(7, 7, 9, 0.75) 0%,
      rgba(7, 7, 9, 0.2) 18%,
      transparent 35%,
      transparent 65%,
      rgba(7, 7, 9, 0.2) 82%,
      rgba(7, 7, 9, 0.75) 100%
    );
  }
}

/* one row, bottom-aligned — like Helious */
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(12rem, 0.75fr);
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end; /* same Y baseline */
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4.5rem, 18vw, 13.5rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: #f6f0e6;
  text-shadow: 0 4px 50px rgba(0, 0, 0, 0.4);
  margin: 0;
  align-self: end;
  overflow: hidden;
}

.hero__letters {
  display: inline-flex;
}

.hero__letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotate(4deg);
  will-change: transform, opacity;
}

.hero__letter.is-in {
  animation: letter-up 0.95s var(--ease-out) both;
}

@keyframes letter-up {
  0% {
    opacity: 0;
    transform: translateY(0.55em) rotate(4deg);
  }
  60% {
    opacity: 1;
    transform: translateY(-0.04em) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

.hero__star {
  font-size: 0.22em;
  vertical-align: super;
  margin-left: 0.05em;
  color: var(--amber);
  display: inline-block;
  opacity: 0;
  transform: scale(0.4);
}

.hero__star.is-in {
  animation: star-pop 0.7s var(--ease-out) both;
}

@keyframes star-pop {
  0% { opacity: 0; transform: scale(0.3) rotate(-40deg); }
  70% { opacity: 1; transform: scale(1.2) rotate(12deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.hero__aside {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.1rem;
  padding-bottom: 0.35em;
  max-width: 18rem;
  justify-self: end;
  opacity: 0;
  transform: translateY(18px);
}

.hero__aside.is-in {
  animation: fade-rise 1s var(--ease-out) both;
}

.hero__bio {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

@media (max-width: 800px) {
  .hero__content {
    grid-template-columns: 1fr;
    row-gap: 1.25rem;
  }
  .hero__aside {
    justify-self: start;
    max-width: 22rem;
    padding-bottom: 0;
  }
  .hero__title {
    font-size: clamp(4rem, 22vw, 7rem);
  }
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  border: 1px solid rgba(242, 235, 224, 0.28);
  background: rgba(10, 10, 12, 0.4);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition:
    background 0.4s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.btn--pill {
  padding: 0.68rem 1.15rem 0.68rem 1.3rem;
  border-radius: 999px;
  width: fit-content;
}

.btn--large {
  padding: 1rem 1.55rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.btn:hover {
  background: rgba(232, 184, 106, 0.12);
  border-color: rgba(232, 184, 106, 0.5);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn__arrow {
  transition: transform 0.3s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ---------- sections: shared head so everything starts on same Y rhythm ---------- */

.section {
  position: relative;
  padding: clamp(4rem, 10vh, 6.5rem) var(--gutter);
  border-top: 1px solid var(--line);
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section__head {
  margin-bottom: 2.25rem;
}

.section__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.85rem;
  line-height: 1;
}

.section__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

/* about — two columns, top-aligned */

.about__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.about__col p {
  color: var(--ink-dim);
  max-width: 40ch;
  margin-bottom: 1rem;
  font-size: 1.02rem;
}

.about__col p:last-child {
  margin-bottom: 0;
}

.about__meta {
  list-style: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.about__meta li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 3.1rem;
  padding: 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.about__meta span {
  color: var(--ink-faint);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.about__meta strong {
  font-weight: 500;
}

.about__meta a {
  color: var(--amber);
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.about__meta a:hover {
  border-bottom-color: var(--amber);
}

@media (max-width: 720px) {
  .about__grid { grid-template-columns: 1fr; }
}

/* links — single-line rows, items vertically centered */

.link-index {
  list-style: none;
  border-top: 1px solid var(--line);
}

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  column-gap: 1.25rem;
  min-height: 5.25rem;
  padding: 0 0.15rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, padding-left 0.35s var(--ease);
}

.link-row:hover {
  padding-left: 0.65rem;
  background: linear-gradient(90deg, rgba(232, 184, 106, 0.05), transparent 50%);
}

.link-row__name {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.link-row__handle {
  font-size: 0.88rem;
  color: var(--amber);
  white-space: nowrap;
}

.link-row__meta {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.link-row__arrow {
  font-size: 1.15rem;
  color: var(--amber);
  transition: transform 0.3s var(--ease);
}

.link-row:hover .link-row__arrow {
  transform: translate(3px, -3px);
}

@media (max-width: 560px) {
  .link-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 0.35rem;
    padding-top: 1.15rem;
    padding-bottom: 1.15rem;
    min-height: 0;
  }
  .link-row__name { grid-column: 1; }
  .link-row__arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .link-row__handle { grid-column: 1; }
  .link-row__meta { display: none; }
}

/* now board — top aligned columns */

.now-board {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
  margin-bottom: 2.5rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.now-board__label {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
  line-height: 1;
}

.now-board__line {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  max-width: 16ch;
}

.now-board__sub {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  color: var(--ink-dim);
  max-width: 30ch;
  line-height: 1.5;
}

.now-board__side {
  border-top: 1px solid var(--line);
  margin: 0;
}

.now-stat {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: center;
  gap: 0.85rem;
  min-height: 3rem;
  border-bottom: 1px solid var(--line);
}

.now-stat dt {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.now-stat dd {
  font-size: 0.92rem;
  color: var(--ink);
}

.stack {
  list-style: none;
  border-top: 1px solid var(--line);
}

.stack__item {
  display: grid;
  grid-template-columns: 2.75rem 1fr auto;
  align-items: center;
  column-gap: 1rem;
  min-height: 3.4rem;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s var(--ease);
}

.stack__item:hover {
  padding-left: 0.4rem;
}

.stack__n {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.stack__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.2;
}

.stack__status {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.stack__item--empty {
  opacity: 0.4;
}

@media (max-width: 720px) {
  .now-board { grid-template-columns: 1fr; }
}

/* notes — quote + footer on one row, center aligned */

.notes {
  border-top: 1px solid var(--line);
}

.note {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 1.5rem;
  min-height: 5rem;
  padding: 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease);
}

.note:hover {
  padding-left: 0.55rem;
}

.note p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.3;
  font-style: italic;
  max-width: 28ch;
  padding: 1.35rem 0;
}

.note footer {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .note {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 1.2rem 0;
    row-gap: 0.4rem;
  }
  .note p { padding: 0; }
}

/* end */

.section--end {
  border-top: none;
  padding-bottom: 4.5rem;
}

.section__inner--end {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 3.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background:
    radial-gradient(ellipse 50% 80% at 50% 100%, rgba(232, 184, 106, 0.09), transparent 60%),
    rgba(12, 11, 10, 0.5);
}

.end__kicker {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.end__title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
}

/* footer */

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  padding: 1.25rem var(--gutter) 2.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.footer__dot { opacity: 0.5; }

/* reveal — section as a whole + staggered children */

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(4px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out),
    filter 0.9s var(--ease-out);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

[data-reveal].is-in .section__head,
[data-reveal].is-in .about__grid,
[data-reveal].is-in .link-index,
[data-reveal].is-in .now-board,
[data-reveal].is-in .stack,
[data-reveal].is-in .notes,
[data-reveal].is-in .section__inner--end > * {
  animation: fade-rise 0.85s var(--ease-out) both;
}

[data-reveal].is-in .section__head { animation-delay: 0.05s; }
[data-reveal].is-in .about__grid,
[data-reveal].is-in .link-index,
[data-reveal].is-in .now-board,
[data-reveal].is-in .notes { animation-delay: 0.18s; }
[data-reveal].is-in .stack { animation-delay: 0.32s; }

[data-reveal].is-in .link-row,
[data-reveal].is-in .stack__item,
[data-reveal].is-in .note {
  animation: row-in 0.7s var(--ease-out) both;
}

[data-reveal].is-in .link-row:nth-child(1),
[data-reveal].is-in .stack__item:nth-child(1),
[data-reveal].is-in .note:nth-child(1) { animation-delay: 0.22s; }
[data-reveal].is-in .link-row:nth-child(2),
[data-reveal].is-in .stack__item:nth-child(2),
[data-reveal].is-in .note:nth-child(2) { animation-delay: 0.32s; }
[data-reveal].is-in .link-row:nth-child(3),
[data-reveal].is-in .stack__item:nth-child(3),
[data-reveal].is-in .note:nth-child(3) { animation-delay: 0.42s; }

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.nav {
  opacity: 0;
  animation: nav-in 0.9s var(--ease-out) 0.15s both;
}

@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* buttons / rows feel */

.link-row,
.stack__item,
.note {
  transition:
    padding-left 0.45s var(--ease),
    background 0.4s var(--ease),
    opacity 0.4s;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal],
  .hero__letter,
  .hero__star,
  .hero__aside,
  .nav {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
