:root {
  --paper: #FAF7F2;
  --ink: #22302A;
  --green: #2E4636;
  --blush: #C4677E;
  --sand: #E6DDD0;
  --muted: #7d8078;
  --serif: "Cormorant Garamond", serif;
  --sans: "Karla", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* the .cursor dot replaces the native cursor on mouse/trackpad only */
@media (pointer: fine) {
  body { cursor: none; }
  body a, body button { cursor: none; }
}

.accent { color: var(--blush); }

/* loader */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.9s cubic-bezier(0.77, 0, 0.18, 1);
}
.loader.done { transform: translateY(-100%); }
.loader-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--paper);
  font-style: italic;
  opacity: 0;
  animation: fadeUp 1s 0.2s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* cursor */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 99;
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s, opacity 0.25s;
  opacity: 0;
}
.cursor.on { opacity: 1; }
.cursor.grow {
  width: 48px; height: 48px;
  background: var(--blush);
  mix-blend-mode: multiply;
}
@media (pointer: coarse) { .cursor { display: none; } }

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem 6vw;
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}
.nav.scrolled {
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(8px);
  padding: 0.9rem 6vw;
  box-shadow: 0 1px 0 rgba(34, 48, 42, 0.08);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: 2.2rem;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--blush);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* hero */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 6vw;
  position: relative;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.hero-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4rem, 15vw, 11rem);
  line-height: 0.95;
  color: var(--green);
}
/* .line clips the word so it slides up out of nothing once body.loaded is set */
.hero-name .line { display: block; overflow: hidden; }
.hero-name .word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.hero-name .word.italic { font-style: italic; color: var(--blush); }
body.loaded .hero-name .word { transform: translateY(0); }
body.loaded .hero-name .line:nth-child(2) .word { transition-delay: 0.12s; }

.hero-sub {
  margin-top: 1.8rem;
  font-size: 1rem;
  color: var(--muted);
}

.scroll-hint {
  position: absolute; bottom: 3rem; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 56px;
  background: rgba(34, 48, 42, 0.2);
  overflow: hidden;
  display: block;
}
.scroll-hint span {
  display: block; width: 100%; height: 40%;
  background: var(--blush);
  animation: drip 1.8s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(260%); }
}

/* ticker */
.ticker {
  overflow: hidden;
  border-top: 1px solid rgba(34, 48, 42, 0.12);
  border-bottom: 1px solid rgba(34, 48, 42, 0.12);
  padding: 0.9rem 0;
  background: var(--paper);
}
.ticker-track {
  display: flex; gap: 3rem;
  width: max-content;
  animation: scroll 34s linear infinite;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--green);
  white-space: nowrap;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
/* -50% lands exactly on the start of the duplicated half of the track */
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* work index */
.work { padding: 8rem 6vw 6rem; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 3rem;
  flex-wrap: wrap; gap: 0.5rem;
}
.section-head h2, .about h2, .contact h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--green);
}
.section-head p { font-size: 0.85rem; color: var(--muted); }

.index { list-style: none; }
.index li {
  border-top: 1px solid rgba(34, 48, 42, 0.14);
  transition: background 0.3s;
}
.index li:last-child { border-bottom: 1px solid rgba(34, 48, 42, 0.14); }
.index button {
  width: 100%;
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.5rem 0.5rem;
  background: none; border: none;
  font-family: inherit;
  text-align: left;
  color: var(--ink);
  transition: padding 0.35s ease;
}
.index li:hover button { padding-left: 1.4rem; }
.index .num {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.3s;
}
.index li:hover .num { color: var(--blush); }
.index .title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 1.15;
  transition: font-style 0.2s, color 0.3s;
}
.index li:hover .title { font-style: italic; color: var(--green); }
.index .tag {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* about */
.about {
  padding: 6rem 6vw;
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  background: var(--sand);
}
.about-photo { position: relative; }
.about-photo img {
  width: 100%; display: block;
  border-radius: 2px;
  filter: saturate(0.8);
}
.about-photo figcaption {
  position: absolute; bottom: -0.9rem; right: -0.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--green);
  background: var(--paper);
  padding: 0.2rem 0.9rem;
}
.about-text h2 { margin: 0.4rem 0 1.2rem; }
.about-text p + p { margin-top: 0.9rem; }

/* contact */
.contact {
  padding: 9rem 6vw;
  text-align: center;
}
.contact h2 { margin-bottom: 2rem; }
.contact-mail {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--blush);
  padding-bottom: 0.2rem;
  transition: color 0.3s;
}
.contact-mail:hover { color: var(--blush); }
.contact-links { margin-top: 2.6rem; display: flex; justify-content: center; gap: 2.4rem; }
.contact-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.contact-links a:hover { color: var(--green); }

/* footer */
.footer {
  display: flex; justify-content: space-between;
  padding: 1.6rem 6vw;
  border-top: 1px solid rgba(34, 48, 42, 0.12);
  font-size: 0.75rem;
  color: var(--muted);
}

/* overlay */
.overlay {
  position: fixed; inset: 0; z-index: 80;
  background: var(--paper);
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.18, 1);
  overflow-y: auto;
}
.overlay.open { transform: translateY(0); }
.overlay-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 6vw 4rem;
}
.overlay-close {
  position: fixed; top: 1.2rem; right: 6vw;
  background: none; border: none;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--ink);
  transition: color 0.3s, transform 0.3s;
  z-index: 81;
}
.overlay-close:hover { color: var(--blush); transform: rotate(90deg); }
.overlay-num {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--blush);
}
.overlay-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: var(--green);
  margin: 0.4rem 0 1rem;
}
.overlay-desc { max-width: 560px; color: var(--muted); margin-bottom: 2.6rem; }
.overlay-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.overlay-gallery figure { margin: 0; }
.overlay-gallery img {
  width: 100%; aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(0.85);
  transition: transform 0.4s ease, filter 0.4s ease;
}
.overlay-gallery img:hover { transform: scale(1.02); filter: saturate(1); }
.overlay-gallery figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.overlay-nav {
  display: flex; justify-content: space-between;
  margin-top: 3.5rem;
  border-top: 1px solid rgba(34, 48, 42, 0.14);
  padding-top: 1.4rem;
}
.overlay-nav button {
  background: none; border: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  transition: color 0.3s;
}
.overlay-nav button:hover { color: var(--blush); }

/* reveal on scroll, .in is added by the IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* responsive */
@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
  .index button { grid-template-columns: 2.4rem 1fr; }
  .index .tag { display: none; }
  .nav-links a { margin-left: 1.2rem; font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
