/* Rachel Sadres — portfolio
   One stylesheet. No build step, no dependencies. */

:root {
  --ink: #192A51;
  --muted: #6B6577;
  --accent-light: #D5C6E0;
  --bg: #F4F3F6;
  --surface: #FFFFFF;
  --accent: #5C4580;
  --accent-soft: #E3DEEE;
  --teal: #2F6B66;
  --rule: #AAA1C8;
  --divider: var(--accent-light);   /* flower divider — set any color here */
  --serif: "Marcellus", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(24px, 5vw, 72px);

  /* type scale — change a size here and it updates everywhere */
  --text-display: clamp(2.3rem, 5.2vw, 3.9rem); /* page titles */
  --text-h2: clamp(1.6rem, 3vw, 2.5rem);        /* section heads, project titles, big stats */
  --text-h3: clamp(1.2rem, 2vw, 1.6rem);        /* row titles, quotes, decks, card titles */
  --text-body: 17px;                             /* paragraphs */
  --text-small: 15px;                            /* captions, meta, buttons, secondary text */
  --text-label: 13px;                            /* uppercase labels, kickers, nav */

  /* image corners */
  --radius-photo: 15px;                          /* photographs (beach photo) */
  --radius-screenshot: 6px;                      /* product screenshots */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--teal); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-soft); }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.dim { color: var(--muted); }
.kicker {
  font-size: var(--text-label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal);
}
.rule-strong { border: 0; border-top: 2px solid var(--ink); margin: 0; }
.surface { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stack { display: flex; flex-direction: column; gap: 10px; font-size: var(--text-small); }
.arw { font-family: var(--serif); }
a.ul { border-bottom: 1px solid var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 243, 246, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  padding-top: 18px; padding-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; color: var(--ink); letter-spacing: .01em; }
.brand-icon { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; flex-wrap: wrap; gap: clamp(14px, 3vw, 38px); font-size: var(--text-label); letter-spacing: .06em; text-transform: uppercase; }
.nav-links a { color: var(--muted); }
.nav-links a[aria-current="page"] { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: end; }
.about-grid { align-items: stretch; row-gap: 0; }
.about-intro { grid-column: 1 / -1; }
.about-grid .lede { grid-column: 1; }
.about-media { grid-column: 2; position: relative; }
.about-media .portrait { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; width: auto; aspect-ratio: 4 / 5; }
.about-media .portrait .shot { height: 100%; width: 100%; aspect-ratio: auto; }
.hero-solo { grid-template-columns: minmax(0, 1fr); }
.hero-solo .lede { max-width: 64ch; }
.hero h1, .page-head h1, .case-head h1 { font-size: var(--text-display); line-height: 1.07; }
.hero .kicker { margin-bottom: 28px; }
.hero h1 { margin-bottom: 32px; }
.lede { display: flex; flex-direction: column; gap: 20px; max-width: 54ch; font-size: var(--text-body); }
.hero .lede { color: var(--muted); }
.hero .lede.body { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-media { display: flex; flex-direction: column; align-items: flex-end; gap: clamp(14px, 2vw, 26px); }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--accent); color: #fff;
  padding: 9px 18px; font-size: var(--text-small); letter-spacing: .03em; line-height: 1.3;
  border: 1px solid var(--accent);
  transition: background .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn:active { background: #402F5A; border-color: #402F5A; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: transparent; border-color: var(--accent); color: var(--accent); }

/* ---------- images ---------- */
.avatar { width: clamp(96px, 10vw, 136px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: 50% 25%; margin-bottom: clamp(20px, 3vw, 32px); }
.frame { margin: 0; border: 1px solid var(--rule); background: var(--surface); padding: 8px; border-radius: calc(var(--radius-screenshot) + 8px); }
.frame .shot, .peek img, .lightbox img { border-radius: var(--radius-screenshot); }
.portrait { padding: 0; border: 0; width: 100%; border-radius: var(--radius-photo); overflow: hidden; }
.portrait .shot { border-radius: var(--radius-photo); }
.portrait .shot { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.shot { width: 100%; }
.hero-shot { margin-top: clamp(28px, 4vw, 44px); padding: 10px; max-width: 66ch; }
.zoom { cursor: zoom-in; }
.shot.missing {
  min-height: 220px; aspect-ratio: 16 / 10; object-fit: contain;
  background: repeating-linear-gradient(135deg, #EFEDF3 0 10px, #E8E5EE 10px 20px);
  border: 1px dashed var(--rule);
  font-family: var(--sans); font-size: var(--text-label); color: var(--muted);
}

/* ---------- botanicals ---------- */
.botanical { width: clamp(56px, 6vw, 92px); height: auto; opacity: .55; pointer-events: none; color: var(--accent); }
.botanical.teal { color: var(--teal); }
.botanical path { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 2.2s cubic-bezier(.2, .7, .2, 1); }
.botanical.is-in path { stroke-dashoffset: 0; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .botanical path { transition: none; }
  .reveal { opacity: 1; transform: none; }
  .botanical path { stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}

/* ---------- selected work / rows ---------- */
.band { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 7vw, 88px); }
.split { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); }
.sticky-h { font-size: var(--text-h2); line-height: 1.15; position: sticky; top: 96px; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px;
  align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--rule); color: var(--ink);
}
.row:hover { color: var(--teal); border-color: var(--teal); }
.row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; }
.row-title { font-family: var(--serif); font-size: var(--text-h3); }
.row-meta { font-size: var(--text-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.arw { font-size: 20px; }
.arw-icon {
  display: inline-block; width: 1.1em; height: .63em; vertical-align: middle;
  background-color: var(--ink);
  -webkit-mask: url(images/arrow-icon.svg) no-repeat center / contain; mask: url(images/arrow-icon.svg) no-repeat center / contain;
  transition: background-color .2s ease;
}
.row:hover .arw-icon { background-color: var(--teal); }
.btn .arw-icon, .btn:hover .arw-icon { background-color: currentColor; }
.btn .arw-icon { width: 16px; height: 9px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(28px, 5vw, 72px); padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); }
.band .stats { padding-top: 0; padding-bottom: 0; }
.big { font-size: var(--text-h2); line-height: 1.1; }
.mid { font-size: var(--text-h2); line-height: 1.15; }
.stats .dim { margin-top: 12px; }
.divided { border-left: 1px solid var(--rule); padding-left: clamp(0px, 3vw, 40px); }

/* ---------- quotes ---------- */
.quotes-band { position: relative; overflow: hidden; padding-bottom: clamp(96px, 10vw, 140px); }
.quotes-band .kicker { margin-bottom: 40px; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(24px, 4vw, 56px); }
.quote { margin: 0; border-top: 2px solid var(--ink); padding-top: 22px; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: var(--text-h3); line-height: 1.45; }
.quote figcaption { margin-top: 18px; font-size: var(--text-small); color: var(--muted); }
.quotes-band .botanical { position: absolute; right: clamp(16px, 4vw, 56px); bottom: clamp(20px, 3vw, 36px); width: clamp(84px, 9vw, 132px); }

/* ---------- cta ---------- */
.cta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(24px, 4vw, 56px); align-items: end; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); }
.cta .dim { margin-top: 12px; max-width: 44ch; }
.cta .actions { margin-top: 0; }
.cta-solo { display: block; }
.surface-soft { background: var(--accent-soft); border-color: var(--accent-soft); }
.surface-soft .dim { color: var(--ink); }

/* ---------- projects ---------- */
.page-head { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; align-items: flex-start; gap: clamp(16px, 3vw, 28px); }
.index-bar {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: 18px 0; font-size: var(--text-small); letter-spacing: .04em;
}
.index-bar a { color: var(--muted); }
.index-bar a:hover { color: var(--accent); }
.projects { padding-top: clamp(8px, 2vw, 20px); padding-bottom: clamp(56px, 8vw, 112px); }
/* botanical divider: flowers keep their shape, only the center line stretches */
.flourish { display: flex; height: clamp(40px, 5vw, 60px); }
.flourish span {
  height: 100%; background-color: var(--divider);
  -webkit-mask: url(images/divider.svg) no-repeat; mask: url(images/divider.svg) no-repeat;
  -webkit-mask-size: auto 100%; mask-size: auto 100%;
}
.flourish .flourish-l { flex: none; aspect-ratio: 115 / 70; -webkit-mask-position: left center; mask-position: left center; margin-right: -1px; }
.flourish .flourish-r { flex: none; aspect-ratio: 124 / 70; -webkit-mask-position: right center; mask-position: right center; margin-left: -1px; }
.flourish .flourish-m { flex: 1; -webkit-mask-size: 5000% 100%; mask-size: 5000% 100%; -webkit-mask-position: center; mask-position: center; }

.project { border-bottom: 1px solid var(--rule); }
.project-head {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(16px, 3vw, 40px); align-items: start; text-align: left;
  background: none; border: 0; padding: clamp(28px, 4vw, 44px) 0;
  font: inherit; color: inherit; cursor: pointer;
}
.project-head-main { display: block; }
.project-head-main .kicker { display: block; margin-bottom: 12px; }
.project-title { display: block; font-family: var(--serif); font-size: var(--text-h2); line-height: 1.12; }
.project-summary { display: block; margin-top: 14px; max-width: 62ch; }
.project-head:hover .project-title { color: var(--teal); }
.project-head-aside { display: flex; align-items: center; gap: 18px; padding-top: 6px; }
.peek { display: block; width: 0; opacity: 0; overflow: hidden; transition: width .45s cubic-bezier(.2, .7, .2, 1), opacity .45s ease; }
.peek img { width: 280px; max-width: none; aspect-ratio: 3 / 2; object-fit: cover; object-position: left top; border: 1px solid var(--rule); }
.project:not(.is-open) .project-head:hover .peek,
.project:not(.is-open) .project-head:focus-visible .peek { width: 280px; opacity: 1; }
.sign { font-family: var(--serif); font-size: 26px; color: var(--accent); line-height: 1; width: 24px; text-align: center; }
.project-body { display: none; padding-bottom: clamp(28px, 4vw, 44px); }
.project.is-open .project-body { display: block; }
.project-body-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.project-body .btn { margin-top: 32px; }
.body { max-width: 66ch; }

.marks { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; max-width: 66ch; }
.marks li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
.mark { color: var(--accent); font-family: var(--serif); }

.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: 36px; }
.case { display: block; color: var(--ink); }
.case .flourish { margin-bottom: 18px; }
.case:hover { color: var(--teal); }
.case:hover .flourish span { background-color: var(--teal); }
.case h3 { font-size: var(--text-h3); line-height: 1.15; }
.case .dim:last-child { margin-top: 10px; font-size: var(--text-small); }

/* ---------- case study ---------- */
.back { padding-top: clamp(28px, 4vw, 48px); font-size: var(--text-small); letter-spacing: .04em; }
.back a { color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.back .arw-back { width: 16px; height: 9px; background-color: currentColor; transform: rotate(180deg); }
.back a:hover { color: var(--accent); }
.case-head { padding-top: clamp(24px, 4vw, 44px); padding-bottom: clamp(32px, 5vw, 56px); }
.case-head .kicker { margin-bottom: 22px; }
.case-head h1 { max-width: 22ch; }
.deck { font-family: var(--serif); font-size: var(--text-h3); line-height: 1.35; color: var(--accent); margin-top: 26px; max-width: 42ch; }
.case-intro { padding-bottom: clamp(32px, 5vw, 56px); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); border-top: 2px solid var(--ink); padding-top: clamp(28px, 4vw, 44px); }
.intro-grid .lede { max-width: 58ch; }
.case-intro-stacked { padding-top: clamp(28px, 4vw, 44px); }
.case-intro-stacked .hero-shot { margin-top: 0; }
.case-intro-stacked .meta { max-width: 66ch; padding-top: 12px; }
.fig-sm { max-width: 420px; }
.meta { margin: 0; }
.meta-row { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 20px; border-bottom: 1px solid var(--rule); padding: 14px 0; }
.meta dt { font-size: var(--text-label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 0; font-size: var(--text-small); }
.case-section { padding-top: clamp(36px, 5vw, 68px); padding-bottom: clamp(36px, 5vw, 68px); }
.prose > * + * { margin-top: 22px; }
.prose strong { font-weight: 600; }
.figs { display: grid; gap: clamp(16px, 2vw, 28px); max-width: 66ch; }
.figs-multi { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.fig { margin: 0; }
.fig figcaption { font-size: var(--text-small); color: var(--muted); margin-top: 10px; font-style: italic; }
.next { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); border-top-width: 2px; border-top-color: var(--ink); }
.next .kicker { color: var(--muted); margin-bottom: 24px; }
.next .row { border-bottom: 0; }
.big-row { font-size: var(--text-h2); line-height: 1.12; }
.next .row-main { display: block; }
.next .row-meta { display: block; margin-top: 10px; text-transform: none; letter-spacing: 0; font-size: var(--text-small); }
.row-desc { display: block; margin-top: 8px; font-size: var(--text-body); line-height: 1.5; color: var(--ink); max-width: 60ch; text-wrap: pretty; }
.row:hover .row-desc { color: var(--ink); }
.rows .row-main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rows .row-desc { margin-top: 0; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(33, 28, 42, .9);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(20px, 5vw, 72px); cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-inner { width: min(1200px, 100%); background: #fff; padding: 14px; }
.lightbox img { width: 100%; max-height: 80vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 24px; right: 28px; color: #fff; font-size: var(--text-label); letter-spacing: .1em; text-transform: uppercase; background: none; border: 0; font-family: inherit; cursor: pointer; }

/* ---------- footer ---------- */
.foot { background: var(--accent); color: #EDEAF2; }
.foot-grid {
  padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 36px; align-items: start;
}
.foot h3 { font-size: var(--text-h2); color: #fff; }
.foot .dim { color: var(--accent-light); margin-top: 10px; }
.foot a { color: #EDEAF2; }
.foot-credit { padding-bottom: 28px; font-size: var(--text-small); color: var(--accent-light); }
.foot-credit p { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; }
.foot a:hover { color: #C9BEE4; }

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
  .hero-grid, .intro-grid, .project-body-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .hero-media { align-items: stretch; }
  .portrait .shot { aspect-ratio: 3 / 2; }
  .about-grid .lede, .about-media { grid-column: 1; }
  .about-media { margin-top: 32px; }
  .about-media .portrait { position: static; aspect-ratio: auto; transform: none; }
  .about-media .portrait, .about-media .portrait .shot { width: 100%; height: auto; }
  .about-media .portrait .shot { aspect-ratio: 3 / 2; }
  .sticky-h { position: static; }
  .divided { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 28px; }
  .nav-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .project-head { grid-template-columns: minmax(0, 1fr) auto; }
  .peek { display: none; }
}
