/* Homepage. Keeps the site's own palette and Archivo;
   adds the diagrams' handwriting for annotations and one drawn flow. */

.portfolio.v3 {
  --mark: #eadccd;           /* the "Funds settled" fill from your diagrams, slightly stronger */
  --hand: "Excalifont", "Archivo", sans-serif;
}
.v3-main :where(h1, h2, h3, p, figure, ol, ul) { margin: 0; }

/* Controls */
.v3-button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 22px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500;
  transition: background-color 160ms ease-out;
}
.v3-button:hover { background: var(--accent); color: var(--paper); }
.v3-link {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--accent); font-weight: 450; text-decoration: underline; text-underline-offset: .28em;
}
.v3-link:hover { text-decoration-thickness: 2px; }
.v3-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.v3-links { display: flex; flex-wrap: wrap; gap: 0 24px; }

.v3-section-title { font-size: clamp(1.6rem, 2.6vw, 2.5rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }

/* Hero */
.v3-hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px 72px; align-items: center;
  padding: 64px 0 72px;
}
.v3-person { display: flex; align-items: center; gap: 16px; }
.v3-person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); }
.v3-person p { display: flex; flex-direction: column; line-height: 1.35; }
.v3-person strong { font-weight: 600; font-size: 1.0625rem; }
.v3-person span { color: var(--ink-soft); font-size: .9375rem; }
.v3-hero h1 {
  margin-top: 28px; max-width: 20ch;
  font-size: clamp(2.2rem, 4vw, 3.6rem); font-weight: 500; line-height: 1.1; letter-spacing: -.035em; text-wrap: balance;
}
.v3-hero .v3-actions { margin-top: 32px; }

.v3-flow { font-family: var(--hand); }
.v3-states { list-style: none; padding: 0; display: grid; gap: 30px; }
.v3-states li {
  display: grid; grid-template-columns: 9.5rem 1fr; align-items: center; gap: 18px; position: relative;
  animation: v3-in 420ms cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 240ms + 200ms);
}
.v3-state { justify-self: stretch; text-align: left; font-size: 1.25rem; color: var(--ink); }
.v3-states li:not(:last-child)::after {
  content: ""; position: absolute; left: 3.2rem; top: 100%; width: 12px; height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 30'%3E%3Cpath d='M6.2 2C5.6 10 6.6 18 6 27M1.8 22.4 6 27.6l4.3-5' fill='none' stroke='%23aaa69c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.v3-note { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; color: var(--ink-soft); line-height: 1.3; }
.v3-note::before {
  content: ""; flex: none; width: 24px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M17 5.4C11 4.6 6 5.2 1.5 5M5 1.2 1.2 5l4.1 3.8' fill='none' stroke='%23aaa69c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.is-current .v3-note { color: var(--accent); }
.v3-state mark { color: inherit; background: none; }
.v3-flow figcaption { margin-top: 28px; font-family: var(--body); font-size: .9375rem; color: var(--ink-soft); max-width: 46ch; }
@keyframes v3-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Now: the profile strip */
.v3-now { border-top: 1px solid var(--rule); padding: 40px 0 48px; }
.v3-now-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 20px; }
.v3-now-head h2 { font-size: 1.25rem; font-weight: 500; letter-spacing: -.015em; }
.v3-roles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; }
.v3-roles li { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--rule); }
.v3-org { font-weight: 600; }
.v3-role { color: var(--accent); font-size: .9375rem; }
.v3-what { color: var(--ink-soft); font-size: .9375rem; line-height: 1.5; margin-top: 6px; }
.v3-since { color: var(--ink-soft); font-size: .8125rem; margin-top: auto; padding-top: 10px; }
.portfolio .v3-background { margin-top: 24px; color: var(--ink-soft); font-size: .9375rem; }

/* Work */
.v3-work { border-top: 1px solid var(--rule); padding-top: 48px; }
.v3-work > .v3-section-title { margin-bottom: 32px; }
.v3-case { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr); gap: 20px 48px; padding-bottom: 48px; }
.v3-case + .v3-case { padding-top: 40px; border-top: 1px solid var(--rule); }
.v3-case-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 32px; }
.v3-case-head h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.2; }
.v3-case-meta { color: var(--ink-soft); font-size: .875rem; }
.v3-sheet a { display: block; }
.portfolio.v3 .v3-sheet img { border: 1px solid var(--rule); }
.v3-decision { align-self: start; border-left: 1px solid var(--rule); padding-left: 28px; }
.v3-q { font-family: var(--hand); font-size: 1.35rem; line-height: 1.3; color: var(--ink); }
.portfolio .v3-decision p + p { margin-top: 14px; color: var(--ink-soft); line-height: 1.6; }
.portfolio .v3-decision .v3-links { margin-top: 16px; }

/* Index rows shared by side projects, research, and writing */
.v3-more { border-top: 1px solid var(--rule); padding: 32px 0 48px; }
.v3-sub-title { font-size: 1.125rem; font-weight: 500; margin-bottom: 8px; }
.v3-index { list-style: none; padding: 0; }
.v3-index li + li { border-top: 1px solid var(--rule); }
.v3-index a {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.7fr) 10rem; gap: 4px 32px; align-items: baseline;
  padding: 16px 0; color: var(--ink); text-decoration: none;
}
.v3-index-title { font-weight: 500; font-size: 1.0625rem; line-height: 1.4; }
.v3-index-sub { color: var(--ink-soft); font-size: .9375rem; line-height: 1.5; }
.v3-index-cat { color: var(--ink-soft); font-size: .8125rem; text-align: right; }
.v3-index a:hover .v3-index-title { color: var(--accent); text-decoration: underline; text-underline-offset: .25em; }
.v3-more > p { margin-top: 8px; }

.v3-research, .v3-writing { border-top: 1px solid var(--rule); padding: 48px 0; }
.portfolio .v3-research-lede { margin: 10px 0 20px; color: var(--ink-soft); max-width: 60ch; }
.v3-writing > .v3-section-title { margin-bottom: 20px; }
.v3-research > .v3-links, .v3-writing > .v3-links { margin-top: 8px; }

.v3-resource { margin-top: 32px; padding: 20px 24px; background: var(--paper-2); max-width: 46rem; }
.v3-resource h3 { font-size: 1.0625rem; font-weight: 500; }
.portfolio .v3-resource p { margin-top: 4px; color: var(--ink-soft); }

.v3-contact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding: 48px 0; border-top: 1px solid var(--rule); }
.v3-contact h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.portfolio.v3 .site-footer { margin-top: 0; }

@media (max-width: 1100px) {
  .v3-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .v3-hero { grid-template-columns: minmax(0, 1fr); padding: 44px 0 56px; }
  .v3-case { grid-template-columns: minmax(0, 1fr); }
  .v3-decision { border-left: 0; padding-left: 0; }
  .v3-index a { grid-template-columns: minmax(0, 1fr) auto; }
  .v3-index-sub { grid-column: 1 / -1; grid-row: 2; }
  .v3-index-cat { grid-column: 2; grid-row: 1; }
}
@media (max-width: 640px) {
  .v3-hero { padding: 32px 0 44px; }
  .v3-hero h1 { font-size: clamp(1.9rem, 8.4vw, 2.5rem); margin-top: 22px; }
  .v3-states { gap: 24px; }
  .v3-states li { grid-template-columns: 7.6rem 1fr; gap: 10px; }
  .v3-state { font-size: 1.1rem; }
  .v3-states li:not(:last-child)::after { left: 2.6rem; height: 24px; }
  .v3-note { font-size: .98rem; gap: 6px; }
  .v3-note::before { width: 16px; }
  .v3-roles { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .v3-case-head { flex-direction: column; }
  .v3-research, .v3-writing, .v3-contact { padding: 36px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .v3-states li { animation: none; }
}
