:root {
  --paper: #fcfafd;
  --lavender: #eee5f7;
  --ink: #241c2c;
  --plum: #5b3473;
  --muted: #5d5263;
  --line: #d5cbd9;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: Inter, system-ui, sans-serif;
  scroll-padding-top: 90px;
}

*, *::before, *::after { box-sizing: border-box; }
.journal { margin: 0; color: var(--ink); background: var(--paper); font: 400 17px/1.65 var(--sans); }
.journal :where(h1, h2, h3, p, dl, dd, ul) { margin: 0; }
.journal :where(h1, h2, h3) { font-family: var(--serif); font-weight: 400; text-wrap: balance; }
.journal h2 { font-size: clamp(36px, 3.8vw, 52px); line-height: 1.06; letter-spacing: -.026em; }
.journal p { max-width: 65ch; }
.journal a { color: inherit; text-decoration: none; }
.journal a:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; }
.journal-width { width: min(1180px, calc(100% - clamp(40px, 9vw, 128px))); margin-inline: auto; }
.journal-skip { position: fixed; top: 8px; left: 12px; z-index: 10; padding: 8px 16px; background: white; transform: translateY(-160%); }
.journal-skip:focus { transform: none; }

/* Masthead and section navigation */
.journal-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.journal-masthead, .journal-nav, .journal-actions, .journal-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.journal-masthead { min-height: 70px; }
.journal-brand { gap: 10px; font: 400 27px/1 var(--serif); letter-spacing: -.025em; }
.journal-monogram {
  display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px;
  background: var(--ink); color: #f5e4ff; font: italic 23px/1 var(--serif); letter-spacing: -.09em;
}
.journal-nav { gap: clamp(16px, 2.6vw, 38px); }
.journal-nav a, .journal-button, .journal-link, .journal-brand {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
}
.journal-nav a { font-size: 14px; font-weight: 600; }
.journal-nav a[aria-current], .journal-nav a:hover, .journal-link:hover, .journal-footer a:hover {
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px;
}
.journal-nav a[aria-current] { color: var(--plum); }
.journal-actions { flex-wrap: wrap; justify-content: flex-start; gap: 8px 24px; margin-top: 25px; }
.journal .journal-button, .journal-link { gap: 12px; font-size: 15px; font-weight: 600; }
.journal .journal-button {
  min-height: 46px; padding: 9px 19px; color: var(--paper); background: var(--plum);
  border: 1px solid var(--plum); border-radius: 999px;
}
.journal .journal-button:hover { background: #462553; color: white; text-decoration: none; }
.journal .journal-button-outline { min-height: 44px; padding: 7px 17px; color: var(--plum); background: transparent; }
.journal .journal-button-outline:hover { color: var(--plum); background: var(--lavender); }
.journal .journal-link { color: var(--plum); }
.journal-link span, .journal-button span { font-size: 1.14em; line-height: 1; }

/* Hero */
.journal-hero {
  position: relative; isolation: isolate; overflow: hidden;
  width: 100%; margin: 0 auto;
  border-bottom: 1px solid var(--line);
  background-color: var(--lavender);
  background-image: linear-gradient(110deg, #faf5ef 0%, #f7f0f8 43%, #e5d8f1 78%, #d9c3e7 100%);
}
.journal-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(to right, #5b347315 1px, transparent 1px),
                    linear-gradient(to bottom, #5b347315 1px, transparent 1px);
  background-size: 24px 24px; mask-image: linear-gradient(95deg, transparent 12%, black 95%);
}
.journal-intro {
  display: grid; grid-template-columns: 3fr 2fr; align-items: center;
  gap: clamp(24px, 5vw, 72px); padding-block: clamp(26px, 3vw, 44px);
  width: min(1180px, calc(100vw - clamp(64px, 12vw, 170px)));
}
.journal-kicker, .journal-meta {
  color: var(--plum); font-size: 12px; line-height: 1.5; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.journal-kicker { display: flex; align-items: center; gap: 12px; }
.journal-kicker::before {
  content: ''; width: 14px; height: 14px; border: 1px solid currentColor; border-radius: 2px;
  background: linear-gradient(90deg, transparent 3px, currentColor 3px 4px, transparent 4px);
}
.journal-hero h1 { margin: 12px 0 10px; font-size: clamp(50px, 7.6vw, 98px); line-height: .98; letter-spacing: -.035em; }
.journal-hero h1 em { color: var(--plum); }
.journal-role { color: var(--plum); font-size: 19px; font-weight: 600; }
.journal-deck { margin-top: 10px; font-size: 18px; }
.journal .journal-deck { max-width: 48ch; color: #51465a; }
.story-deck {
  display: grid;
  grid-template-areas: "panel" "tabs";
  grid-template-columns: minmax(0, 1fr);
  align-self: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 14px 36px -24px var(--ink);
}
.story-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-area: panel;
  min-width: 0;
  min-height: clamp(255px, 21vw, 305px);
  border-radius: 17px 17px 0 0;
}
.story-tabs[hidden] + .story-panel { border-radius: 17px; }
.story-profile {
  background: radial-gradient(ellipse at 80% 25%, white, var(--lavender));
}
.journal-portrait {
  position: absolute; top: 0; right: 0;
  display: block; width: 87%; height: 100%; object-fit: cover; object-position: center 23%;
  mix-blend-mode: multiply;
  mask-image: linear-gradient(to right, transparent, black 20%);
}
.story-caption {
  position: absolute; inset: auto 0 0; padding: 36px 24px 16px;
  background: linear-gradient(transparent, rgb(20 18 27 / .85) 75%);
  color: white; display: grid; line-height: 1.35;
}
.story-caption strong { font-size: 18px; }
.story-caption span { font-size: 13px; }
.story-tabs {
  grid-area: tabs; display: flex; align-items: stretch; padding: 0 8px;
  border-radius: 0 0 17px 17px; background: var(--paper);
}
.story-tabs[hidden], .story-panel[hidden] { display: none; }
.story-tabs button {
  position: relative; flex: 1; min-height: 50px; border: 0; padding: 8px 3px;
  background: transparent; color: var(--muted); font: 600 13px/1.2 var(--sans); cursor: pointer;
}
.story-tabs button[aria-selected="true"] { color: var(--plum); }
.story-tabs button[aria-selected="true"]::after {
  content: ''; position: absolute; bottom: 5px; height: 3px; width: 24px;
  left: calc(50% - 12px); border-radius: 2px; background: currentColor;
}
.story-tabs button:hover { color: var(--plum); text-decoration: underline; }
.story-tabs button:focus-visible, .story-panel:focus-visible {
  outline: 3px solid var(--plum); outline-offset: -4px;
}
.story-project {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 8px; padding: clamp(20px, 2.4vw, 32px); background: var(--ink); color: var(--paper);
  font-size: 15px; line-height: 1.45;
}
.story-project .story-context { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.story-number, .story-headline { font: 400 clamp(38px, 4.6vw, 64px)/1 var(--serif); }
.story-project a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }
.story-project a:focus-visible { outline-color: currentColor; }
.story-search { background: var(--lavender); color: var(--ink); }

/* Project features */
.journal-section { padding-block: clamp(44px, 5vw, 72px); }
.journal-work-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.journal .journal-rule-title { font-size: clamp(34px, 3.4vw, 46px); }
#work { padding-top: clamp(28px, 3vw, 42px); }
.project-feature {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(36px, 8vw, 120px); align-items: center; padding-block: 36px;
}
.journal-meta span { padding-inline: 5px; }
.project-feature h3 { margin: 10px 0 14px; max-width: 23ch; font-size: clamp(35px, 3.7vw, 54px); line-height: 1.03; letter-spacing: -.026em; }
.project-feature p:not(.journal-meta), .journal-contact p { color: var(--muted); }
.project-feature .journal-link { margin-top: 9px; }
.project-cover {
  --muted: #e4d8e8;
  position: relative; isolation: isolate; overflow: hidden; border-radius: 16px;
  padding: clamp(26px, 3.5vw, 48px); gap: clamp(30px, 6vw, 90px);
  color: #fffaf7; background: linear-gradient(108deg, #2b1d34 12%, #412b4c 72%, #51335d);
}
.project-cover::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none; width: 430px; aspect-ratio: 1;
  top: -275px; right: -195px; border: 1px solid #ffffff1a; border-radius: 50%;
  box-shadow: 0 0 0 20px #ffffff06, 0 0 0 42px #ffffff06, 0 0 0 68px #ffffff06, 0 0 0 98px #ffffff06;
}
.project-cover .journal-meta, .project-cover .journal-link { color: #ead1fb; }
.project-cover .journal-link { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: #b291c6; }
.project-cover .journal-link:focus-visible { outline-color: #fff; }
.project-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding-left: clamp(24px, 3.3vw, 52px); border-left: 1px solid #80688b;
}
.project-facts div { display: flex; flex-direction: column-reverse; align-items: flex-start; }
.project-facts dt { margin-top: 4px; color: #e4d8e8; font-size: 13px; }
.project-facts dd { font: 500 clamp(21px, 2vw, 28px)/1.1 var(--sans); letter-spacing: -.04em; }
.project-facts .project-reach { grid-column: 1 / -1; padding-bottom: 16px; border-bottom: 1px solid #80688b; }
.project-reach dd { color: #eed5ff; font: 400 clamp(52px, 5.5vw, 80px)/.96 var(--serif); }
.project-feature-secondary { padding: clamp(28px, 4vw, 50px) 0 0; }
.project-feature-secondary h3 { margin-bottom: 0; font-size: clamp(31px, 3.2vw, 44px); }

/* Expertise and writing */
.journal-expertise { padding-block: clamp(36px, 4.5vw, 62px); background: #f5f0f5; border-block: 1px solid var(--line); }
.journal-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 64px); }
.expertise-list { list-style: none; padding: 0; border-left: 2px solid #ba9acc; padding-left: clamp(18px, 2.3vw, 32px); }
.expertise-list li { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.expertise-list li:first-child { padding-top: 0; }
.expertise-list li:last-child { border: 0; padding-bottom: 0; }
.expertise-list strong { font-size: 16px; font-weight: 600; }
.expertise-list span { font-size: 16px; color: var(--muted); }
.journal-section-head { margin-bottom: 26px; }
.article-row { position: relative; display: grid; grid-template-columns: minmax(130px, .3fr) 1fr; align-items: center; gap: 24px; padding: 24px 0; border-block-start: 1px solid var(--line); }
.article-row:last-child { border-bottom: 1px solid var(--line); }
.article-meta { display: grid; gap: 2px; color: var(--muted); font-size: 14px; }
.article-meta time { color: var(--plum); font-weight: 600; }
.article-row h3 { font-size: clamp(26px, 2.7vw, 38px); line-height: 1.12; letter-spacing: -.015em; text-wrap: pretty; }
.article-row a { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; }
.article-row a:hover { color: var(--plum); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.article-row a span { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid #c9b7d3; border-radius: 50%; font: 400 19px var(--sans); color: var(--plum); }
.article-row a:is(:hover,:focus-visible) span { background: var(--plum); color: white; }

.journal-contact { padding-block: clamp(38px, 5vw, 66px); background: linear-gradient(100deg, #f1e9f6, #e4d6ec); border-block: 1px solid var(--line); }
.journal-contact p { margin-top: 12px; }
.journal-contact .journal-section-head { margin-bottom: 0; }
.journal-contact .journal-button { flex-shrink: 0; }
.journal-footer > div, .journal-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px; }
.journal-footer > div { justify-content: space-between; padding-block: 14px; }
.journal-footer { font-size: 13px; color: var(--muted); }
.journal-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 740px) {
  :root { scroll-padding-top: 112px; }
  .journal-masthead { align-items: flex-start; flex-direction: column; gap: 0; padding: 3px 0 6px; }
  .journal-brand { font-size: 25px; }
  .journal-nav { width: 100%; gap: 0; justify-content: space-between; }
  .journal-nav a { padding: 0 4px; }
  .journal-nav .journal-button { padding-inline: 12px; }
  .journal-intro, .project-feature, .journal-split { grid-template-columns: 1fr; }
  .story-panel { min-height: 270px; }
  .journal-hero h1 { font-size: clamp(48px, 10vw, 68px); }
  .journal-intro { width: calc(100% - 40px); gap: 22px; }
  .journal-portrait { width: 100%; object-fit: contain; mask-image: none; }
  .journal .journal-deck { font-size: 17px; }
  .journal-actions { gap: 6px 16px; }
  .project-feature { gap: 20px; padding-block: 26px; }
  .project-feature-secondary { padding-bottom: 0; }
  .project-cover { padding: 24px; }
  .project-facts { grid-template-columns: 1fr; gap: 0; padding: 0; border-left: 0; }
  .project-facts div, .project-facts .project-reach { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 11px 0; border-top: 1px solid #80688b; border-bottom: 0; }
  .project-reach dd { font-size: 42px; }
  .journal-section-head { gap: 16px; }
  .article-row { grid-template-columns: 1fr; gap: 8px; padding-block: 20px; }
  .article-meta { display: flex; gap: 16px; }
  .journal-contact .journal-section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .journal-nav a { padding-inline: 2px; }
  .journal-nav .journal-button { padding-inline: 10px; }
  .journal-actions { gap: 4px 12px; }
  .journal-actions .journal-button, .journal-actions .journal-link { gap: 6px; font-size: 14px; }
  .journal-actions .journal-button { padding-inline: 12px; }
  .story-tabs button { font-size: 12px; }
  .expertise-list li { grid-template-columns: 1fr; gap: 2px; }
  .journal-footer > div { display: block; }
  .journal-footer nav { margin-top: 4px; }
}

@media (min-width: 741px) and (max-height: 800px) {
  .story-panel { min-height: 225px; }
  .journal-intro { padding-block: 16px; }
  .journal-actions { margin-top: 15px; }
  .journal-work-head { margin-bottom: 10px; }
  .story-tabs button { min-height: 44px; }
  .journal-hero h1 { font-size: clamp(54px, 6.2vw, 80px); }
  #work { padding-top: 22px; }
  .project-cover { padding-block: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
  .journal-button { transition: background-color .15s, color .15s; }
}
