/* =========================================================
   Varvara Gorelina — Portfolio Design System v3
   Neutral, white-background, single sans-serif typeface.
   Accent: #FFE77C. Case pages: rows pair text (33vw) with its
   own image(s) (67vw) so they scroll together, in sync, always
   adjacent — matching the order of Site-Portfolio.docx.
   ========================================================= */

:root {
  --bg: #FFFFFF;
  --ink: #111111;
  --dim: #6B6B6B;
  --faint: #9A9A9A;
  --line: #E8E8E8;
  --line-strong: #D8D8D8;
  --yellow: #FFE77C;
  --yellowLight: #FFFAE5;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

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

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  max-width: 1040px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo span { color: var(--ink); font-weight: 400; }
.logo-mark { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.9rem;
}
.nav-links a { text-decoration: none; color: var(--dim); transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: 96px 28px 64px;
}
.hero-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.hero-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.hero-top h1 { margin: 0; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--dim);
  display: block;
  margin-bottom: 20px;
}
h1 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  line-height: 1.2;
  margin: 0 0 22px;
  letter-spacing: -0.015em;
  max-width: 18ch;
  color: var(--ink);
}
.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--dim);
  margin: -8px 0 22px;
}
.lede {
  font-size: 1.1rem;
  color: var(--dim);
  max-width: 58ch;
  margin: 0 0 30px;
  font-weight: 400;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-meta .tag { background: #FFF6CE; /* var(--yellow)*/ }
.tag {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--yellow);
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 0;
}

/* ---------- Sections ---------- */
section { max-width: 1040px; margin: 0 auto; padding: 0 28px; }
.section-label {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--faint);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-transform: none;
}
.section-label::after { content: none; }

/* ---------- Case index (simple stacked list, editorial style) ---------- */
.case-grid {
  display: block;
  background: none;
  border: none;
  border-top: 1px solid var(--line);
  margin-bottom: 100px;
}
.case-card {
  display: grid;
  grid-template-columns: 408px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 36px 20px;
  margin: 0 -20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  border-radius: 0;
  transition: background-color 0.15s;
}
.case-card:hover { background-color: var(--yellowLight); }
.case-thumb {
  width: 408px;
  height: 255px;
  object-fit: cover;
  background: #FAFAFA;
  border-radius: 3px;
}
.case-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.case-desc { color: var(--dim); font-size: 0.98rem; margin: 0; max-width: 56ch; }
.case-arrow {
  font-family: var(--sans);
  color: var(--faint);
  font-size: 1rem;
  padding-top: 6px;
  transition: transform 0.15s;
}
.case-card:hover .case-arrow { transform: translateX(3px); }

@media (max-width: 640px) {
  .case-card { grid-template-columns: 1fr; gap: 12px; padding: 28px 12px; margin: 0 -12px; }
  .case-thumb { width: 100%; height: 220px; }
  .case-arrow { display: none; }
}

/* ---------- About / bio ---------- */
.bio-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  margin-bottom: 100px;
}
.bio-grid p { margin: 0 0 20px; color: var(--dim); }
.bio-grid strong { color: var(--ink); font-weight: 600; }
.trait { margin-bottom: 24px; }
.trait h3 {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink);
  margin: 0 0 10px;
  letter-spacing: 0;
  font-weight: 600;
}
.trait p { margin: 0; font-size: 0.92rem; color: var(--dim); }

.trait-highlight h3 {
  display: inline-block;
  background: var(--yellow);
  padding: 5px 10px;
  border-radius: 6px;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tool-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.tool-icon {
  position: relative;
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: transparent;
}
.tool-icon-wrap { position: relative; display: inline-flex; }
.tool-icon-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #FFFFFF;
  font-size: 0.76rem;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 20;
}
.tool-icon-wrap:hover::after { opacity: 1; }

@media (max-width: 780px) {
  .bio-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- CV section ---------- */
.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.cv-name { font-size: 1.6rem; font-weight: 500; margin: 0 0 4px; letter-spacing: -0.01em; }
.cv-role { color: var(--dim); margin: 0 0 8px; }
.cv-contact { color: var(--faint); font-size: 0.88rem; margin: 0; }
.cv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 100px;
}
.cv-grid h3 { font-size: 1rem; font-weight: 600; margin: 28px 0 12px; }
.cv-grid h3:first-child { margin-top: 0; }
.cv-grid p { color: var(--dim); margin: 0 0 8px; }
.cv-job { margin-bottom: 10px !important; } /* base 8px + 20% */
.cv-grid ul { color: var(--dim); padding-left: 20px; margin: 0 0 16px; }
.cv-grid li { margin-bottom: 8px; }
.cv-grid strong { color: var(--ink); }
.cv-dim { color: var(--faint); font-size: 0.9rem; }
@media (max-width: 780px) {
  .cv-grid { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Contact / footer ---------- */
.contact-box {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  margin-bottom: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.contact-box h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.contact-box p { color: var(--dim); margin: 0; }
.btn {
  font-family: var(--sans);
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--yellow);
  padding: 13px 22px;
  border-radius: 6px;
  letter-spacing: 0;
  white-space: nowrap;
  transition: filter 0.15s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-icon { width: 18px; height: 18px; object-fit: contain; }
.btn:hover { filter: brightness(0.97); }
.btn-outline {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);

}
.btn-outline:hover {
  background: var(--yellow);
  border-color: var(--yellow);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 60px;
}
.site-footer .wrap {
  max-width: 1040px;
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 0.85rem;
}

/* =========================================================
   Case study page — split layout
   Left 33vw: sticky text panel (always white), holding ALL the
   case text in order. Right 67vw: images only, in doc order.
   The sidebar uses plain position:sticky with NO internal
   overflow/scrollbar — it scrolls in the same motion as the
   page, so the two columns are always perfectly in sync.
   Image widths are expressed as a fraction of a 1600px reference
   canvas: --w:1600 renders full-bleed (100vw); smaller values sit,
   centered, inside the 67vw media column at their true proportion.
   ========================================================= */

.case-layout {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.case-side {
  width: 33vw;
  flex: 0 0 33vw;
  background: #FFFFFF;
  position: sticky;
  top: 64px; /* below sticky header */
  align-self: stretch;
  padding: 48px 46px 80px 40px;
  border-right: 1px solid var(--line);
  z-index: 30;
  isolation: isolate;
}
.case-side .eyebrow { margin-bottom: 16px; }
.case-side h1 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  max-width: none;
  margin-bottom: 8px;
}
.case-side .case-sub { color: var(--dim); font-size: 0.98rem; margin: 0 0 28px; }

.case-meta-block {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.case-side h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 30px 0 10px;
  letter-spacing: -0.005em;
}
.case-side h2:first-of-type { margin-top: 0; }
.case-side h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 8px;
}
.case-side p { color: var(--dim); font-size: 0.95rem; margin: 0 0 14px; }
.case-side ul, .case-side ol { color: var(--dim); font-size: 0.95rem; padding-left: 20px; margin: 0 0 14px; }
.case-side li { margin-bottom: 6px; }
.case-side strong { color: var(--ink); }
.case-side a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.case-side blockquote {
  border-left: 2px solid var(--yellow);
  margin: 18px 0;
  padding: 2px 0 2px 16px;
  font-size: 0.95rem;
  color: var(--ink);
}
.quote-attr { display: block; font-size: 0.8rem; color: var(--faint); margin-top: 6px; }

.case-media {
  width: 67vw;
  flex: 0 0 67vw;
  padding: 0 0 100px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.case-media.gap-lg { gap: 36px; }

.shot-img {
  display: block;
  width: calc(var(--w, 1600) / 1600 * 100vw);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.shot-img.full-bleed {
  width: 100vw;
  max-width: none;
  margin-left: -33vw;
}
.shot-img.align-right {
  margin-left: auto;
  margin-right: 0;
}

.shot-caption {
  display: inline-block;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.485; /* base line-height 1.65, reduced 10% */
  color: var(--dim);
  background: #FFFFFF;
  padding: 6px 12px;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.07);
  margin: -16px auto 0;
}
.shot-caption a { color: #007AFF; }

.shot-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto;
}
.shot-row .shot-img { margin: 0; }
.shot-row-item { display: flex; flex-direction: column; align-items: center; gap: 0; }

.shot-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}
.shot-scroll-wrap img {
  width: auto;
  max-width: none;
  height: auto;
}

.side-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}

.shot-table-wrap {
  width: 100vw;
  margin-left: -33vw;
  overflow-x: auto;
  padding: 0 40px;
}
.persona-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1400px;
  font-size: 0.82rem;
}
.persona-table th, .persona-table td {
  border: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  color: var(--dim);
}
.persona-table th {
  background: #FAFAFA;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8rem;
}
.persona-table td strong, .persona-table td em { color: var(--ink); font-style: normal; }
.persona-table .cell-label { font-weight: 600; color: var(--ink); display: block; margin-bottom: 6px; }

.case-nav {
  width: 100%;
  padding: 40px 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.case-nav a {
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--dim);
}
.case-nav a:hover { color: var(--ink); }
.case-nav .dir { display: block; color: var(--faint); font-size: 0.78rem; margin-bottom: 4px; }

/* ---------- Mobile fallback: stack, no full-bleed math ---------- */
@media (max-width: 900px) {
  .case-layout { flex-direction: column; }
  .case-side {
    width: 100%;
    flex-basis: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 40px 24px;
  }
  .case-media { width: 100%; flex-basis: auto; padding: 32px 24px; gap: 20px; }
  .shot-img, .shot-img.full-bleed {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
  }
  .shot-table-wrap { width: 100%; margin-left: 0; padding: 0; }
  .case-nav { padding: 32px 24px; }
}
