:root {
  --lavender: #b8b0ea;
  --lavender-deep: #9a90c8;
  --black: #000;
  --white: #fff;
  --olive: #4a4a1f;
  --grey-on-dark: #cfcfcf;
  --placeholder: #c9c2e6;
  --placeholder-dark: #1c1c1c;
  --tracked: 0.18em;
  --max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-height: 72px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  height: 100%;
  scroll-padding-top: var(--header-height);
}

body { height: 100%; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-height);
}

body[data-theme="light"] { background: var(--lavender); color: var(--black); }
body[data-theme="dark"]  { background: var(--black);    color: var(--white); }
body[data-theme="white"] { background: var(--white);    color: var(--black); }

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

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

main img {
  transition: transform 320ms ease, filter 320ms ease;
}
@media (prefers-reduced-motion: reduce) {
  main img {
    transition: none;
  }
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { flex: 1 0 auto; }

/* ---------- Golden cursor trail ---------- */
@media (pointer: fine) {
  .star-sprinkle {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 2147483647;
  }

  .star-sprinkle {
    width: var(--sprinkle-size, 4px);
    height: var(--sprinkle-size, 4px);
    border-radius: 50%;
    background: radial-gradient(circle, #fff8cf 0%, #f7c548 58%, rgba(247, 197, 72, 0) 72%);
    box-shadow: 0 0 8px rgba(255, 207, 74, 0.65);
    transform: translate3d(var(--sprinkle-x), var(--sprinkle-y), 0) scale(1);
    animation: star-sprinkle-fade 520ms ease-out forwards;
  }

  @keyframes star-sprinkle-fade {
    to {
      opacity: 0;
      transform: translate3d(
        calc(var(--sprinkle-x) - var(--sprinkle-drift-x)),
        calc(var(--sprinkle-y) - var(--sprinkle-drift-y)),
        0
      ) scale(0);
    }
  }
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .star-sprinkle {
    display: none;
  }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: var(--header-height);
  padding: 1.25rem 0;
  transition: background-color 220ms ease, color 220ms ease;
}
body[data-theme="light"] .site-header { background-color: var(--lavender); }
body[data-theme="dark"] .site-header { background-color: var(--black); }
body[data-theme="white"] .site-header { background-color: var(--white); }
.site-header .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.brand {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-self: start;
}
.brand img {
  height: 32px;
  width: auto;
  display: block;
  transition: filter 220ms ease;
}
body[data-theme="dark"] .brand img { filter: invert(1); }
.nav {
  display: flex;
  gap: 2.25rem;
  justify-self: center;
}
.nav a {
  font-size: 0.72rem;
  letter-spacing: var(--tracked);
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
}
.header-links {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}
.header-links a {
  font-size: 0.62rem;
  letter-spacing: var(--tracked);
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.2;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
@media (max-width: 640px) {
  .site-header .container {
    grid-template-columns: auto 1fr auto;
    column-gap: 1rem;
  }
  .nav { gap: 1.2rem; }
  .nav a { font-size: 0.66rem; }
  .header-links a { font-size: 0.56rem; }
}

/* ---------- Centered name title ---------- */
.center-title {
  text-align: center;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  letter-spacing: var(--tracked);
  text-transform: uppercase;
  font-weight: 700;
}
body[data-theme="light"] .center-title { color: var(--olive); }
body[data-theme="dark"]  .center-title { color: var(--white); font-weight: 500; font-size: clamp(0.95rem, 1.4vw, 1.1rem); }
body[data-theme="white"] .center-title { color: var(--black); font-weight: 500; font-size: clamp(0.95rem, 1.4vw, 1.1rem); }

/* ---------- Home: asymmetric photo hero ---------- */
.home-hero {
  position: relative;
  margin-top: 3rem;
  min-height: clamp(420px, 55vh, 620px);
  isolation: isolate;
}
.home-hero .title-slot {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 2;
  mix-blend-mode: difference;
}
body[data-theme="light"] .home-hero .title-slot,
body[data-theme="dark"]  .home-hero .title-slot { color: #fff; }
.home-hero .photo { z-index: 1; }
.home-hero .photo {
  position: absolute;
  background: var(--placeholder);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,0.35);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.home-hero .photo img { width: 100%; height: 100%; object-fit: cover; }
.home-hero .photo.left {
  left: 4%;
  top: 38%;
  width: clamp(150px, 22vw, 300px);
  aspect-ratio: 4 / 5;
}
.home-hero .photo.right {
  right: 4%;
  top: 6%;
  width: 32%;
  aspect-ratio: 4 / 5;
}
@media (max-width: 720px) {
  .home-hero { min-height: 360px; }
  .home-hero .photo.left  { top: 50%; }
  .home-hero .photo.right { width: 50%; top: 0; }
}

/* ---------- Tagline / education ---------- */
.tagline-block {
  text-align: center;
  margin: 4.5rem auto 1.5rem;
  max-width: 70ch;
  font-size: 0.78rem;
  letter-spacing: var(--tracked);
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.7;
}

/* ---------- Home: about block ---------- */
.about {
  max-width: 620px;
  margin: 5rem auto 4.5rem;
  padding: 0 1rem;
  text-align: center;
}
.about-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  font-size: 0.7rem;
  letter-spacing: var(--tracked);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--olive);
  margin-bottom: 2rem;
}
.about-eyebrow::before,
.about-eyebrow::after {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--olive);
  opacity: 0.45;
}
.about-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  font-weight: 500;
  color: var(--olive);
  margin: 0 auto 1.75rem;
  max-width: 38ch;
}
.about-body {
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 0 auto 1.15rem;
  max-width: 54ch;
  color: rgba(0, 0, 0, 0.78);
}
.about-body:last-child { margin-bottom: 0; }
.about-place {
  font-weight: 600;
  color: var(--olive);
  white-space: nowrap;
}

/* ---------- Home: horizontal photo rails ---------- */
.photo-section {
  margin: 2.5rem 0 3rem;
  content-visibility: auto;
  contain-intrinsic-size: 420px;
}
.rail-heading {
  font-size: 0.82rem;
  letter-spacing: var(--tracked);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.9rem;
  color: var(--olive);
}
.rail-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.rail-header .rail-heading {
  margin-bottom: 0;
}
.shuffle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0.25rem;
  margin: 0;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  transition: opacity 180ms ease, transform 400ms ease;
}
.shuffle-btn:hover,
.shuffle-btn:focus-visible {
  opacity: 1;
  outline: none;
}
.shuffle-btn:hover {
  transform: rotate(180deg);
}
.shuffle-btn:active {
  transform: rotate(360deg);
}
.shuffle-btn img {
  width: 36px;
  height: 36px;
  display: block;
}
.photo-rail {
  --rail-tile: clamp(140px, 18vw, 200px);
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, var(--rail-tile));
  grid-auto-columns: var(--rail-tile);
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.photo-rail::-webkit-scrollbar { height: 6px; }
.photo-rail::-webkit-scrollbar-track { background: transparent; }
.photo-rail::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 3px;
}
.photo-rail .tile {
  position: relative;
  background: var(--placeholder);
  border-radius: 2px;
  overflow: hidden;
  scroll-snap-align: start;
  margin: 0;
}
.photo-rail .tile.feature {
  grid-row: span 2;
  grid-column: span 2;
}
.photo-rail .tile.feature figcaption {
  font-size: 1rem;
  padding: 1.2rem;
}
.photo-rail .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-rail .tile figcaption {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}
.photo-rail .tile:hover img,
.home-hero .photo:hover img,
.work-tile:hover img,
.life-media:hover img {
  transform: scale(1.025);
  filter: saturate(1.04) contrast(1.02);
}
.photo-rail .tile:hover figcaption,
.photo-rail .tile:focus-within figcaption {
  opacity: 1;
}
@media (hover: none), (pointer: coarse) {
  .photo-rail .tile figcaption {
    opacity: 0;
  }
  .photo-rail .tile.has-caption::after {
    content: "i";
    position: absolute;
    right: 0.55rem;
    bottom: 0.55rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    color: var(--white);
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1;
    pointer-events: none;
    transition: opacity 180ms ease;
  }
  .photo-rail .tile.is-caption-visible figcaption {
    opacity: 1;
  }
  .photo-rail .tile.is-caption-visible::after {
    opacity: 0;
  }
}
/* ---------- Shared work showcase ---------- */
.work-showcase {
  background: var(--white);
  color: var(--black);
  margin: clamp(6rem, 10vw, 9rem) 0 0;
  scroll-margin-top: 0;
}
body[data-theme="light"] .work-showcase {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(5rem, 9vw, 8rem) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) clamp(5rem, 9vw, 8rem);
}
body[data-theme="white"] .work-showcase {
  margin: 0 0 6rem;
  padding-top: 4rem;
}
.work-showcase .work-title {
  color: var(--black);
  margin: 0 0 clamp(4rem, 12vw, 10rem);
}
body[data-theme="light"] .work-showcase .work-title,
body[data-theme="white"] .work-showcase .work-title {
  color: var(--black);
}
.life-showcase .life-title {
  color: var(--white);
  margin: 0 0 clamp(4rem, 12vw, 10rem);
}
body[data-theme="light"] .life-showcase .life-title,
body[data-theme="dark"] .life-showcase .life-title,
body[data-theme="white"] .life-showcase .life-title {
  color: var(--white);
}
.work-list {
  display: block;
}
.work-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 6.5rem);
  align-items: stretch;
  margin-bottom: clamp(6rem, 12vw, 10rem);
  content-visibility: auto;
  contain-intrinsic-size: 920px;
}
.work-entry:last-child {
  margin-bottom: 0;
}
.work-entry.is-reversed .work-media {
  order: 2;
}
.work-entry.is-reversed .work-copy {
  order: 1;
}
.work-media { align-self: start; }
.work-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
}
.work-tile {
  aspect-ratio: 1 / 1;
  background: var(--placeholder);
  border-radius: 0;
  overflow: hidden;
}
.work-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.work-copy {
  display: flex;
  flex-direction: column;
  padding-top: 0.15rem;
  max-width: 64ch;
}
.work-copy p {
  font-size: 0.92rem;
  line-height: 1.72;
  margin-bottom: 1rem;
  color: var(--black);
}
.work-label {
  margin-bottom: 1.4rem;
  font-size: 0.7rem;
  letter-spacing: var(--tracked);
  text-transform: uppercase;
  line-height: 1.6;
  font-weight: 600;
  color: var(--black);
  max-width: 44ch;
}
.work-copy p:last-child {
  margin-bottom: 0;
}
.work-showcase a {
  color: inherit;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ---------- Home: life story ---------- */
.life-showcase {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(5rem, 9vw, 8rem) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  background: var(--black);
  color: var(--white);
  scroll-margin-top: 0;
}
.life-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: start;
}
.life-media {
  margin: 0;
}
.life-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: 42% 50%;
  overflow: hidden;
  background: var(--placeholder-dark);
}
.life-media figcaption {
  margin-top: 0.85rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}
.life-copy {
  max-width: 52ch;
  padding-top: 0.25rem;
}
.life-copy p {
  font-size: 0.92rem;
  line-height: 1.72;
  margin-bottom: 1rem;
}
.life-copy p:last-child {
  margin-bottom: 0;
}
@media (max-width: 720px) {
  .work-entry {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 5rem;
  }
  .work-entry.is-reversed .work-media,
  .work-entry.is-reversed .work-copy {
    order: initial;
  }
  .work-copy {
    min-height: 0;
  }
  .work-label {
    margin-bottom: 1.1rem;
  }
  .work-copy {
    max-width: none;
  }
  .life-entry {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .life-copy {
    max-width: none;
    padding-top: 0;
  }
}

/* ---------- Footer (themed) ---------- */
.site-footer { flex-shrink: 0; }

.footer-meta {
  padding: 1.5rem 0;
  font-size: 0.7rem;
  letter-spacing: var(--tracked);
  text-transform: uppercase;
}
body[data-theme="light"] .footer-meta { background: var(--lavender-deep); color: var(--white); }
body[data-theme="dark"]  .footer-meta { background: var(--black); color: var(--white); border-top: 1px solid rgba(255,255,255,0.1); }
body[data-theme="white"] .footer-meta { background: var(--black); color: var(--white); border-top: 1px solid rgba(255,255,255,0.1); }
.footer-meta .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-made {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: var(--tracked);
  text-transform: uppercase;
  padding: 3rem 0 1rem;
}
body[data-theme="light"] .footer-made { background: var(--lavender-deep); color: var(--white); }
body[data-theme="dark"]  .footer-made { background: var(--black); color: var(--white); }
body[data-theme="white"] .footer-made { background: var(--black); color: var(--white); }

/* The big "L  L" letterforms with center dot */
.brand-footer {
  position: relative;
  height: clamp(280px, 40vh, 460px);
  overflow: hidden;
}
body[data-theme="light"] .brand-footer { background: var(--lavender-deep); }
body[data-theme="dark"]  .brand-footer { background: var(--black); }
body[data-theme="white"] .brand-footer { background: var(--black); }
.brand-footer .l-mark {
  position: absolute;
  bottom: -22%;
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(280px, 38vw, 560px);
  line-height: 1;
  color: var(--white);
  user-select: none;
}
.brand-footer .l-mark.left  { left: 0; }
.brand-footer .l-mark.right { right: 0; }
.brand-footer .dot {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
}
