/* ============================================================
   Cait Downey — personal site
   Palette: warm cream / deep ink / muted violet / warm gold
   Type: Fraunces (display serif) + Inter (sans body)
   ============================================================ */

:root {
  /* Color */
  --cream: #F5EFE6;
  --cream-2: #EFE7D8;
  --paper: #FBF7EF;
  --ink: #1F1A24;          /* deep aubergine-black */
  --ink-2: #3B3340;
  --muted: #6F6675;
  --line: #E3D9C7;
  --violet: #6B4E9E;       /* deep refined violet */
  --violet-soft: #A491D3;  /* matches headshot bg */
  --violet-tint: #EDE6F5;
  --gold: #B8884A;         /* warm secondary accent */
  --ok: #2F7D5B;

  /* Type */
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spacing */
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(64px, 9vw, 128px);
  --maxw: 1180px;

  /* Radius / shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: rgba(107,78,158,0.45); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--violet); }

::selection { background: var(--violet-soft); color: var(--ink); }

.skip {
  position: absolute; top: -200px; left: 12px;
  background: var(--ink); color: var(--cream); padding: 8px 12px; border-radius: 6px;
  z-index: 100;
  transition: top .2s ease;
}
.skip:focus { top: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in oklab, var(--cream) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); font-family: var(--serif);
  font-size: 18px; font-weight: 500; letter-spacing: -0.01em;
}
.logo svg { color: var(--violet); }
.logo-text { font-style: italic; }
.nav nav { display: flex; gap: clamp(14px, 2.2vw, 28px); align-items: center; }
.nav nav a {
  font-size: 14px; color: var(--ink-2); text-decoration: none;
  font-weight: 500; letter-spacing: 0.01em;
}
.nav nav a:hover { color: var(--violet); }
.nav-cta {
  border: 1px solid var(--ink);
  padding: 7px 14px; border-radius: 999px;
}
.nav-cta:hover { background: var(--ink); color: var(--cream) !important; }

@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .logo-text { display: none; }
}

/* ---------- General section ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}
.kicker {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--violet); font-weight: 600; margin: 0 0 18px;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 56px;
  max-width: 22ch;
}
.section-head h2 em { font-style: italic; color: var(--violet); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  padding: 14px 22px; border-radius: 999px;
  text-decoration: none; transition: transform .15s ease, background .2s ease, color .2s ease;
  border: 1px solid transparent; line-height: 1;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--violet); transform: translateY(-1px); }
.btn.ghost { color: var(--ink); border-color: transparent; padding-left: 6px; }
.btn.ghost:hover { color: var(--violet); }
.btn.outline {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.btn.outline:hover { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gutter) var(--section-y);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.hero-copy { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 0.04em; color: var(--ink-2);
  margin: 0 0 22px; font-weight: 500;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ok) 22%, transparent);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
}
.hero h1 .muted {
  display: block;
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.45;
  font-family: var(--sans);
  color: var(--ink-2);
  letter-spacing: 0;
  margin-top: 22px;
  font-weight: 400;
  max-width: 28ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-meta {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
  border-top: 1px solid var(--line); padding-top: 22px;
  max-width: 460px;
}
.hero-meta li {
  display: grid; grid-template-columns: 64px 1fr; gap: 14px;
  font-size: 14px; color: var(--ink-2);
}
.hero-meta li span:first-child {
  font-family: var(--serif); font-style: italic;
  color: var(--violet); font-size: 13px;
}

.hero-photo {
  margin: 0;
  position: relative;
}
.hero-photo::before {
  /* lavender stamp behind the photo */
  content: "";
  position: absolute; inset: -18px -18px auto auto;
  width: 78%; height: 78%;
  background: var(--violet-soft);
  border-radius: var(--r-lg);
  z-index: 0;
}
.hero-photo img {
  position: relative; z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: 0 20px 50px -20px rgba(31,26,36,0.25);
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 380px; margin-bottom: 6px; }
  .hero-photo::before { inset: -12px -12px auto auto; }
}

/* ---------- Decorative Wallpaper Logos ---------- */
.wallpaper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

html, body { overflow-x: hidden; }
body { position: relative; }

/* Make sure main content sits above wallpaper */
.nav, main { position: relative; z-index: 1; }

.wp {
  position: absolute;
  display: block;
  mix-blend-mode: multiply;
  filter: saturate(1.05);
  border-radius: 10px;
  user-select: none;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-14px) rotate(var(--rot, 0deg)); }
}

/* ---- HubSpot — biggest, most prominent, orange ---- */
.wp-hs { opacity: 0.18; }
.wp-hs-1 { width: 380px; top: 6%;  right: -80px; --rot: -8deg; animation-delay: 0s; opacity: 0.22; }
.wp-hs-2 { width: 240px; top: 88%; left: -50px;  --rot: 14deg; animation-delay: 4s; }
.wp-hs-3 { width: 280px; top: 156%; right: 5%;   --rot: -6deg; animation-delay: 7s; }
.wp-hs-4 { width: 200px; top: 230%; left: 14%;   --rot: 9deg; animation-delay: 2s; opacity: 0.16; }
.wp-hs-5 { width: 260px; top: 320%; right: -40px; --rot: -12deg; animation-delay: 5s; }

/* ---- Tapcheck — medium, blue/teal ---- */
.wp-tc { opacity: 0.22; }
.wp-tc-1 { width: 200px; top: 42%;  left: 4%;    --rot: 8deg; animation-delay: 1s; }
.wp-tc-2 { width: 170px; top: 124%; right: -30px; --rot: -10deg; animation-delay: 4s; }
.wp-tc-3 { width: 180px; top: 210%; left: 8%;    --rot: 5deg; animation-delay: 6s; }
.wp-tc-4 { width: 150px; top: 290%; right: 12%;  --rot: -8deg; animation-delay: 3s; opacity: 0.18; }

/* ---- Deel — smallest, lavender matches background so needs higher opacity ---- */
.wp-de { opacity: 0.45; }
.wp-de-1 { width: 170px; top: 70%;  left: 38%;   --rot: 6deg; animation-delay: 3s; }
.wp-de-2 { width: 150px; top: 190%; right: 4%;   --rot: -6deg; animation-delay: 6s; }
.wp-de-3 { width: 140px; top: 270%; left: 32%;   --rot: 10deg; animation-delay: 8s; opacity: 0.35; }

/* Reduce on small screens */
@media (max-width: 720px) {
  .wp-hs-1 { width: 220px; right: -60px; }
  .wp-hs-2, .wp-hs-3 { width: 160px; }
  .wp-hs-4, .wp-hs-5 { width: 140px; }
  .wp-tc-1, .wp-tc-2, .wp-tc-3, .wp-tc-4 { width: 110px; }
  .wp-de-1, .wp-de-2, .wp-de-3 { width: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  .wp { animation: none; }
}

/* ---------- Logo Strip ---------- */
.logos {
  max-width: 1120px;
  margin: 16px auto 0;
  padding: 0 clamp(20px, 5vw, 64px);
}
.logos > .logo-row {
  background: linear-gradient(135deg, #A491D3 0%, #8E76C6 100%);
  border-radius: 16px;
  padding: 32px clamp(28px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(40px, 8vw, 96px);
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(107, 78, 158, 0.12);
}
.logos-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
  font-weight: 500;
}
.strip-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  opacity: 0.92;
  transition: opacity 200ms, transform 200ms;
}
.strip-logo:hover { opacity: 1; transform: scale(1.05); }

@media (max-width: 720px) {
  .strip-logo { height: 40px; }
  .logos > .logo-row { gap: 36px; padding: 24px; }
}

/* ---------- About ---------- */
.about-body {
  max-width: 62ch;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--ink-2);
  line-height: 1.7;
}
.about-body p { margin: 0 0 22px; }
.about-body .lede {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 30px;
}
.about-body a { color: var(--violet); }

/* ---------- Work ---------- */
.work-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(20px, 4vw, 72px);
  padding: 44px 0;
  border-top: 1px solid var(--line);
}
.work-item:first-of-type { border-top: 1px solid var(--ink); }
.work-item:last-of-type { border-bottom: 1px solid var(--line); }
.work-meta .years {
  font-family: var(--serif);
  font-style: italic;
  color: var(--violet);
  font-size: 15px;
  margin: 0 0 12px;
}
.work-meta .company {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  line-height: 1.1;
}
.work-meta .role {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.work-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  max-width: 26ch;
}
.work-body p {
  margin: 0 0 18px;
  color: var(--ink-2);
  max-width: 60ch;
}
.tags {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tags li {
  font-size: 12px; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2);
  background: var(--paper);
}
.kpis {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  max-width: 520px;
}
.kpis li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.kpis .num {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 500;
  color: var(--violet);
  letter-spacing: -0.02em;
  line-height: 1;
}
.kpis .label {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}

.side-projects .work-meta .company { font-style: italic; }
.side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}
.side-card {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.side-card .side-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.side-card .side-kind {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--violet); margin: 0 0 14px;
}
.side-card p:last-child {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .work-item { grid-template-columns: 1fr; gap: 18px; padding: 36px 0; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .side-grid { grid-template-columns: 1fr; }
}

/* ---------- Recommendations ---------- */
.words {
  background:
    radial-gradient(800px 400px at 90% 0%, var(--violet-tint), transparent 70%),
    var(--cream);
  max-width: none;
  padding-left: 0; padding-right: 0;
}
.words .section-head, .words .quotes { max-width: var(--maxw); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.quotes {
  list-style: none; padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 64px);
}
.quotes .quote:first-child {
  grid-column: 1 / -1;
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.quotes .quote:first-child blockquote {
  max-width: 28ch;
}
.quotes .quote:first-child figcaption {
  max-width: 28ch;
}
.quote {
  position: relative;
  padding-top: 6px;
}
.quote blockquote {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.quote:first-child blockquote {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.35;
}
.quote blockquote p { margin: 0; text-indent: -0.4em; }
.quote figcaption {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.quote figcaption .who {
  font-weight: 600;
  color: var(--ink);
}
.quote figcaption .what {
  color: var(--muted);
}

@media (max-width: 760px) {
  .quotes { grid-template-columns: 1fr; }
  .quotes .quote:first-child { grid-column: auto; }
}

/* ---------- Off the clock ---------- */
.offclock-body {
  max-width: 60ch;
  margin-bottom: 48px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.5;
  color: var(--ink-2);
}
.photo-strip {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 14px;
}
.photo-strip figure { margin: 0; }
.photo-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-md);
}
.photo-strip figure:nth-child(2) img { aspect-ratio: 3 / 4; }
.photo-strip figcaption {
  margin-top: 10px;
  font-size: 13px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
}

@media (max-width: 760px) {
  .photo-strip { grid-template-columns: 1fr; }
}

/* ---------- Resume ---------- */
.resume {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.resume-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}
.resume-row .kicker { margin-bottom: 6px; }
.resume-row h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  margin: 0;
  letter-spacing: -0.01em;
  max-width: 30ch;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  max-width: none;
  padding-left: 0; padding-right: 0;
}
.contact .contact-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}
.contact .kicker { color: var(--violet-soft); }
.contact h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  max-width: 18ch;
}
.contact h2 em { font-style: italic; color: var(--violet-soft); }
.contact-sub {
  color: color-mix(in oklab, var(--paper) 75%, transparent);
  font-size: 17px;
  max-width: 46ch;
  margin: 0;
}
.contact-sub em { color: var(--violet-soft); font-style: italic; }
.contact-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 18px;
}
.contact-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  align-items: baseline;
  padding-bottom: 18px;
  border-bottom: 1px solid color-mix(in oklab, var(--paper) 14%, transparent);
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .label {
  font-family: var(--serif); font-style: italic;
  color: var(--violet-soft); font-size: 13px;
}
.contact-list a {
  color: var(--paper);
  text-decoration-color: color-mix(in oklab, var(--violet-soft) 60%, transparent);
}
.contact-list a:hover { color: var(--violet-soft); }

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

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: color-mix(in oklab, var(--paper) 60%, transparent);
  padding: 22px var(--gutter) 32px;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; gap: 12px; align-items: center;
  font-size: 13px;
  border-top: 1px solid color-mix(in oklab, var(--paper) 12%, transparent);
  padding-top: 22px;
}
.footer-spacer { opacity: 0.5; }
.to-top {
  margin-left: auto;
  color: color-mix(in oklab, var(--paper) 80%, transparent);
  text-decoration: none;
}
.to-top:hover { color: var(--violet-soft); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
