/* kadyalice.com
   Light falling into the dark: a halo above, rays through it, motes
   drifting down. Display type is outlined (.wm, see type/type.css);
   everything else is Mona Sans. */

@font-face {
  font-family: "Mona Sans";
  src: url("fonts/MonaSans-VF.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mona Sans";
  src: url("fonts/MonaSans-Italic-VF.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --void: #050608;
  --void-up: #0b0f16;
  --ink: #f1f3f6;
  --ink-soft: #c8cdd4;
  --ink-muted: #8d96a1;       /* 6.6:1 on void */
  --line: rgb(255 255 255 / 0.12);
  --line-strong: rgb(255 255 255 / 0.32);

  /* dawn: the halo's two colors, from coelacanth's blue and GAZE's pink */
  --dawn-blue: #cfe2ff;
  --dawn-pink: #ffe1ee;
  --halo: #fff9f0;

  --sans: "Mona Sans", system-ui, sans-serif;
  --glow: drop-shadow(0 0 0.18em rgb(220 235 255 / 0.35));
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 350;
  font-stretch: 108%;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: rgb(207 226 255 / 0.3); }

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 50;
  padding: 0.5rem 1rem; background: var(--ink); color: var(--void); border-radius: 999px;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 1px solid var(--dawn-blue); outline-offset: 4px; border-radius: 4px; }

/* sky ------------------------------------------------------------------- */

.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }

.sky-halo {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 42% at 50% -6%, rgb(255 249 240 / 0.22), transparent 70%),
    radial-gradient(38% 26% at 42% -2%, rgb(207 226 255 / 0.16), transparent 70%),
    radial-gradient(38% 26% at 58% -2%, rgb(255 225 238 / 0.11), transparent 70%),
    linear-gradient(var(--void-up), var(--void) 60%);
}

/* thin beams fanning down from above the top edge */
.sky-rays {
  position: absolute; left: 50%; top: -30vh;
  width: 220vmax; height: 220vmax; translate: -50% 0;
  background: repeating-conic-gradient(from 160deg at 50% 0%,
    rgb(255 250 240 / 0.05) 0deg 0.6deg, transparent 0.6deg 3.7deg,
    rgb(207 226 255 / 0.035) 3.7deg 4.1deg, transparent 4.1deg 7deg);
  -webkit-mask: radial-gradient(closest-side at 50% 0%, #000 0%, transparent 60%);
  mask: radial-gradient(closest-side at 50% 0%, #000 0%, transparent 60%);
  animation: sway 40s ease-in-out infinite alternate;
}
@keyframes sway { from { rotate: -3deg; } to { rotate: 3deg; } }

.sky-motes { position: absolute; inset: 0; width: 100%; height: 100%; }

.sky-grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.07; mix-blend-mode: overlay;
}

/* nav ------------------------------------------------------------------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  transition: background 0.5s, backdrop-filter 0.5s;
}
.nav.scrolled {
  background: linear-gradient(rgb(5 6 8 / 0.82), rgb(5 6 8 / 0.5));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-home { font-size: 1.6rem; line-height: 0; opacity: 0; transition: opacity 0.5s; }
.nav.scrolled .nav-home { opacity: 1; }
.nav nav { display: flex; gap: clamp(1.1rem, 3vw, 2.4rem); }
.nav nav a {
  text-decoration: none; font-size: 0.82rem; font-weight: 400; font-stretch: 125%;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft);
  transition: color 0.3s, text-shadow 0.3s;
}
.nav nav a:hover { color: var(--ink); text-shadow: 0 0 12px rgb(207 226 255 / 0.8); }

/* hero ------------------------------------------------------------------ */

.hero {
  min-height: 100svh;
  display: grid; place-content: center; justify-items: center;
  gap: clamp(2rem, 5vh, 3.5rem);
  padding: 6rem var(--gutter) 4rem;
  text-align: center;
  position: relative;
}
.hero-mark { display: grid; justify-items: center; position: relative; }
.hero h1 { margin: 0; font-size: clamp(4rem, 19vw, 15rem); line-height: 0; filter: var(--glow); }
.hero-role { margin: 0.45em 0 0; font-size: clamp(1.5rem, 4.4vw, 2.9rem); line-height: 0; color: var(--ink-soft); }

/* the halo: a hairline ring floating above the name */
.halo {
  width: 34%; overflow: visible;
  margin-bottom: 1.6vw;
  translate: 0 0;
  animation: float 7s ease-in-out infinite;
}
.halo ellipse {
  fill: none; stroke: var(--halo); stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgb(255 249 240 / 0.9)) drop-shadow(0 0 16px rgb(207 226 255 / 0.7));
}
@keyframes float { 50% { translate: 0 -0.6vw; } }

.hero-fields {
  margin: 0; max-width: 64rem; text-wrap: balance;
  font-size: 0.8rem; font-weight: 400; font-stretch: 125%;
  letter-spacing: 0.2em; text-transform: uppercase; line-height: 2.1;
  color: var(--ink-muted);
}
.hero-down {
  position: absolute; bottom: 2.2rem; left: 50%; translate: -50% 0;
  width: 2rem; height: 3.5rem; display: grid; place-items: center;
}
.hero-down i {
  width: 1px; height: 100%;
  background: linear-gradient(transparent, var(--ink));
  animation: fall 2.6s var(--ease) infinite;
  transform-origin: top;
}
@keyframes fall { 0% { scale: 1 0; opacity: 1; } 70% { scale: 1 1; opacity: 1; } 100% { scale: 1 1; opacity: 0; } }

/* reveal on scroll */
.rise { opacity: 0; translate: 0 2.5rem; transition: opacity 1.2s var(--ease), translate 1.2s var(--ease); }
.rise.in { opacity: 1; translate: 0 0; }

/* index ----------------------------------------------------------------- */

.section-title { margin: 0 0 clamp(2rem, 5vw, 3.5rem); font-size: clamp(1.6rem, 4vw, 3rem); line-height: 0; color: var(--ink-soft); }

.index { padding: clamp(5rem, 12vw, 9rem) var(--gutter); position: relative; }
.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index-list a {
  display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: 1rem;
  padding: clamp(1rem, 2.2vw, 1.6rem) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: clamp(1.9rem, 5.2vw, 4.4rem);
  color: var(--ink-soft);
  transition: color 0.4s, filter 0.4s, padding 0.6s var(--ease);
}
.index-list .wm { justify-self: start; --fit: 100vw - 2 * var(--gutter) - 16rem; }
@media (max-width: 640px) { .index-list .wm { --fit: 100vw - 2 * var(--gutter) - 4rem; } }
.index-n, .index-sub {
  font-size: 0.78rem; font-weight: 400; font-stretch: 125%;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted);
}
.index-list a:hover, .index-list a:focus-visible { color: var(--ink); filter: var(--glow); padding-left: 0.6rem; }

.index-preview {
  position: fixed; left: 0; top: 0; z-index: 5;
  width: min(30vw, 420px); aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 6px; pointer-events: none;
  opacity: 0; scale: 0.92;
  transition: opacity 0.35s, scale 0.5s var(--ease);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.9), 0 0 50px -10px rgb(207 226 255 / 0.25);
}
.index-preview.on { opacity: 0.92; scale: 1; }
@media (hover: none), (max-width: 760px) { .index-preview { display: none; } }

@media (max-width: 640px) {
  .index-list a { grid-template-columns: 2.4rem 1fr; }
  .index-sub { display: none; }
}

/* project --------------------------------------------------------------- */

.project { padding-bottom: clamp(5rem, 12vw, 10rem); }

.cover { position: relative; margin: 0; }
.cover img {
  width: 100%; height: min(92svh, 62vw); object-fit: cover;
  -webkit-mask: linear-gradient(#000 55%, transparent);
  mask: linear-gradient(#000 55%, transparent);
}
.cover-title {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0;
  display: grid; justify-items: start; gap: 0.6rem;
}
.cover-title h2 { margin: 0; font-size: clamp(3rem, 11vw, 10rem); line-height: 0; filter: var(--glow); }
.cover-title p { margin: 0; font-size: clamp(1rem, 2.6vw, 2.1rem); line-height: 0; color: var(--ink-soft); }

.project-body {
  display: grid; gap: clamp(2.5rem, 6vw, 6rem);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) 0;
}
.prose { max-width: 62ch; color: var(--ink-soft); }
.prose p { margin: 0 0 1.3em; }
.prose em { font-style: italic; color: var(--ink); }
.prose a { text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
.prose a:hover { text-decoration-color: var(--ink); }

/* flow: the pipeline charts from the print portfolio */
.flow {
  list-style: none; margin: 0; padding: 0;
  display: grid; justify-items: center;
  font-size: 0.72rem; font-weight: 400; font-stretch: 125%;
  letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.25;
  position: sticky; top: 6rem;
}
.flow > li, .flow .pair span {
  display: grid; place-items: center; text-align: center;
  min-width: 11.5rem; max-width: 11.5rem; min-height: 3.1rem; padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgb(255 255 255 / 0.03);
  color: var(--ink-soft);
  box-shadow: inset 0 0 18px -8px rgb(207 226 255 / 0.4);
}
.flow > li:not(:last-child) { margin-bottom: 1.9rem; position: relative; }
.flow > li:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; top: calc(100% + 0.35rem);
  width: 1px; height: 1.2rem; background: var(--line-strong);
}
.flow > li:not(:last-child)::before {
  content: ""; position: absolute; left: calc(50% - 3px); top: calc(100% + 1.25rem);
  width: 5px; height: 5px; border: solid var(--line-strong); border-width: 0 1px 1px 0; rotate: 45deg;
}
.flow .pair {
  all: unset; display: flex; gap: 0.75rem;
  position: relative; margin-bottom: 1.9rem;
}
.flow .pair span { min-width: 9.5rem; max-width: 9.5rem; position: relative; }
.flow .pair span::after {
  content: ""; position: absolute; left: 50%; top: calc(100% + 0.35rem);
  width: 1px; height: 1.2rem; background: var(--line-strong);
}
.flow .pair:last-child { margin-bottom: 0; }
.flow .pair:last-child span::after { display: none; }

@media (max-width: 900px) {
  .project-body { grid-template-columns: 1fr; }
  .flow { position: static; justify-self: start; }
}

/* gallery: justified rows. Each figure carries its aspect ratio as --r, so
   every image in a row ends up the same height. .g-full takes a whole row. */
.gallery {
  display: flex; flex-wrap: wrap; gap: clamp(0.75rem, 1.6vw, 1.5rem);
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) 0;
}
.gallery::after { content: ""; flex: 1 1 0; }
.gallery figure {
  margin: 0; display: grid; gap: 0.6rem; align-content: start;
  flex: var(--r) 1 calc(var(--r) * clamp(10rem, 22vw, 20rem));
  min-width: 0;
}
.gallery .g-full { flex-basis: 100%; }
.gallery img {
  width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover;
  border-radius: 4px; cursor: zoom-in;
  transition: filter 0.5s, box-shadow 0.5s;
}
.gallery img:hover { filter: brightness(1.08); box-shadow: 0 0 60px -18px rgb(207 226 255 / 0.45); }
.gallery figcaption {
  font-size: 0.72rem; font-weight: 400; font-stretch: 125%;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted);
}

/* video: a still and a button until clicked, then the player loads */
.video {
  position: relative; margin: clamp(2rem, 5vw, 4rem) var(--gutter) 0;
  aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  background: #000;
}
.video img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, center); opacity: 0.55; transition: opacity 0.6s, scale 1.2s var(--ease); }
.video button {
  all: unset; cursor: pointer; position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 1.2rem;
  font-size: 0.85rem; font-weight: 400; font-stretch: 125%;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink);
}
.video button i {
  width: 5rem; height: 5rem; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.7);
  box-shadow: 0 0 30px -4px rgb(207 226 255 / 0.6), inset 0 0 20px -6px rgb(207 226 255 / 0.6);
  display: grid; place-items: center;
  transition: scale 0.6s var(--ease), box-shadow 0.6s;
}
.video button i::after {
  content: ""; margin-left: 0.3rem;
  border-style: solid; border-width: 0.6rem 0 0.6rem 1rem;
  border-color: transparent transparent transparent var(--ink);
}
.video:hover img { opacity: 0.75; scale: 1.02; }
.video:hover button i { scale: 1.08; box-shadow: 0 0 50px 0 rgb(207 226 255 / 0.7), inset 0 0 24px -6px rgb(207 226 255 / 0.8); }
.video button:focus-visible i { outline: 1px solid var(--dawn-blue); outline-offset: 6px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* reel + contact -------------------------------------------------------- */

.reel { padding: clamp(2rem, 6vw, 5rem) 0; }
.reel .video { margin-top: 0; }

.contact {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
}
.contact-portrait {
  width: 100%; max-height: 80svh; object-fit: cover; border-radius: 4px;
  -webkit-mask: radial-gradient(85% 70% at 50% 45%, #000 55%, transparent 100%);
  mask: radial-gradient(85% 70% at 50% 45%, #000 55%, transparent 100%);
}
.contact-text { max-width: 46ch; color: var(--ink-soft); }
.contact-text p { margin: 0 0 2rem; font-size: 1.15rem; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.links a {
  font-size: 0.9rem; font-weight: 400; font-stretch: 125%; letter-spacing: 0.1em;
  text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--line-strong); padding-bottom: 0.2rem;
  transition: border-color 0.3s, text-shadow 0.3s;
}
.links a:hover { border-color: var(--ink); text-shadow: 0 0 14px rgb(207 226 255 / 0.8); }

@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
  .contact-portrait { max-height: 60svh; }
}

.footer {
  padding: 2rem var(--gutter) 3rem; text-align: center;
  font-size: 0.72rem; font-stretch: 125%; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-muted);
}

/* lightbox -------------------------------------------------------------- */

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; cursor: zoom-out;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(5 6 8 / 0.92); backdrop-filter: blur(8px); }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 4px; box-shadow: 0 0 120px -30px rgb(207 226 255 / 0.4); }
.lightbox-close {
  all: unset; cursor: pointer; position: fixed; top: 1.2rem; right: 1.5rem;
  font-size: 0.78rem; font-stretch: 125%; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft);
}

/* motion ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1; translate: none; }
}
