/* ------------------------------------------------------------------
   iamtracy.com
   Palette sampled from the paintings themselves.
   ------------------------------------------------------------------ */

:root {
  --paper:      #ECEDE9;
  --paper-2:    #E4E5E0;
  --ink:        #241F2E;
  --ink-soft:   #5E5769;
  --ink-faint:  #8B8595;
  --violet:     #5B45A8;
  --rose:       #A0577F;
  --aurora:     #7FA85C;
  --night:      #12102F;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --gutter: clamp(1.5rem, 5vw, 5.5rem);
  --section: clamp(6rem, 14vw, 11rem);
  --measure: 34rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper fibre. Very low opacity — felt, not seen. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
}

.wrap {
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 1rem;
  z-index: 200;
  background: var(--paper);
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
}

/* ---------------- header ---------------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.mark {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-weight: 400;
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem clamp(1.1rem, 3vw, 2.5rem);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (max-width: 26rem) {
  .nav { font-size: 0.75rem; letter-spacing: 0.1em; }
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--aurora);
}

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

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
  padding-block: clamp(1rem, 3vw, 2.5rem) var(--section);
}

/* Keep the sheet a believable size — a painting, not a billboard. */
.hero-art .plate {
  max-width: min(100%, 26rem);
  margin-inline: auto;
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: 1fr 0.9fr;
    gap: clamp(3rem, 7vw, 7rem);
  }
}

.hero-name {
  font-family: var(--display);
  /* Hold the optical size down at display scale: Fraunces' text cut is
     softer and rounder than its high-contrast display cut, which would
     drift toward a Didone. */
  font-optical-sizing: none;
  font-variation-settings: "opsz" 22, "SOFT" 100, "WONK" 1;
  font-weight: 300;
  font-size: clamp(3.4rem, 13vw, 8.5rem);
  line-height: 0.86;
  letter-spacing: -0.025em;
  margin: 0;
}

.hero-name .quiet {
  display: block;
  font-size: 0.31em;
  letter-spacing: 0.03em;
  font-weight: 400;
  color: var(--ink-soft);
  margin-bottom: 0.5em;
  font-variation-settings: "SOFT" 30, "WONK" 0;
}

.hero-line {
  max-width: 24rem;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* ---------------- pigment plate ---------------- */

/* The signature: work sits on the page as a wash. Feathered deckle
   edge, and the piece's own dominant pigment blooming behind it. */
.plate {
  position: relative;
  isolation: isolate;
}

/* Pigment soaking outward, not a drop shadow: wide, pale, very diffuse. */
.plate::before {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(54% 42% at 50% 50%, var(--bleed, var(--violet)) 0%, transparent 78%);
  filter: blur(85px);
  opacity: 0;
  transition: opacity 1.8s ease 0.25s;
}

.plate img {
  position: relative;
  z-index: 1;
  width: 100%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 2.6%, #000 97.4%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 1.5%, #000 98.5%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0, #000 2.6%, #000 97.4%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 1.5%, #000 98.5%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.reveal.is-in .plate::before,
.hero-art .plate::before { opacity: 0.42; }

/* ---------------- sections ---------------- */

.section { padding-block: var(--section); }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 clamp(2.5rem, 6vw, 4rem);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(36, 31, 46, 0.14);
}

/* ---------------- work ---------------- */

.works {
  display: grid;
  gap: clamp(5rem, 12vw, 9rem);
}

.work { margin: 0; }

@media (min-width: 60rem) {
  .work {
    display: grid;
    grid-template-columns: 1fr 15rem;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }
  .work--offset { margin-left: clamp(0rem, 10vw, 9rem); }
  .work--flip { grid-template-columns: 15rem 1fr; }
  .work--flip .plate { order: 2; }
  .work--flip .label { order: 1; text-align: right; }
}

/* Gallery wall label: medium and support, the way it reads on a wall. */
.label {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink-soft);
  padding-top: 0.9rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(36, 31, 46, 0.16);
}

@media (min-width: 60rem) {
  .label {
    margin-top: 0;
    position: sticky;
    top: 3rem;
  }
}

.label .title {
  display: block;
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.label .meta {
  display: block;
  letter-spacing: 0.03em;
}

.label .qualifier {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

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

/* Register change: paper gives way to sky. Photographs keep hard
   edges — they are not washes. */
.sky {
  background: var(--night);
  color: #C9CBE4;
  margin-top: var(--section);
}

.sky .eyebrow {
  color: rgba(201, 203, 228, 0.6);
  border-bottom-color: rgba(201, 203, 228, 0.2);
}

.sky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 22rem));
  gap: clamp(1.5rem, 4vw, 3rem);
  justify-content: center;
}

.shot { margin: 0; }

.shot img { width: 100%; }

.shot figcaption {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(201, 203, 228, 0.2);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 203, 228, 0.65);
}

/* ---------------- about ---------------- */

.about {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

@media (min-width: 52rem) {
  .about { grid-template-columns: 20rem 1fr; }
}

.portrait img {
  width: 100%;
  filter: saturate(0.92);
}

.about-body { max-width: var(--measure); }

.about-body p {
  margin: 0 0 1.25rem;
}

.about-body p:first-child {
  font-family: var(--display);
  font-variation-settings: "SOFT" 45, "WONK" 1;
  font-weight: 300;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.32;
  letter-spacing: -0.012em;
  color: var(--ink);
}

/* ---------------- contact ---------------- */

.contact {
  border-top: 1px solid rgba(36, 31, 46, 0.14);
  padding-block: var(--section) clamp(3rem, 7vw, 5rem);
}

.contact-link {
  font-family: var(--display);
  font-variation-settings: "SOFT" 50, "WONK" 1;
  font-weight: 300;
  font-size: clamp(1.75rem, 6vw, 3.75rem);
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1.1;
  display: inline-block;
  background-image: linear-gradient(var(--rose), var(--rose));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.contact-link:hover { background-size: 100% 1px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

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

/* Hero arrives on page load — CSS only, never gated behind JS or a
   scroll observer, because it is the first thing anyone sees. */
@keyframes rise {
  from { opacity: 0; transform: translateY(1.75rem); }
  to   { opacity: 1; transform: none; }
}

.hero-intro { animation: rise 1.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-art   { animation: rise 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }

/* Below the fold, reveal on scroll — but only once JS has confirmed it
   can undo it. Without JS the content is simply visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .plate::before { opacity: 0.42; }
}
