/* ── PORTFOLIO SHARED STYLES, LIGHT MODE ── */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:        #faf9f6;
  --surface:   #ffffff;
  --surface-2: #f3f1ec;
  --ink:       #1d2024;
  --ink-2:     #3d434a;
  --ink-3:     #6b7178;
  --rule:      #e2ddd3;
  --rule-2:    #d6cfc1;
  --accent:    #8a3324;
  --accent-soft: #f4e9e5;
  --accent-rule: #e3c8c1;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR (LIGHT) ── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 268px;
  background: var(--surface);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  padding: 36px 28px;
  z-index: 200;
  overflow-y: auto;
}

.sidebar-back {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.15s;
}
.sidebar-back:hover { color: var(--accent); }

.sidebar-case-num {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.sidebar-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 32px;
}

.sidebar-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}

.sidebar-nav a:hover { background: var(--surface-2); color: var(--ink); }
.sidebar-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-nav .nav-num {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 600;
  width: 24px;
  color: var(--ink-3);
}
.sidebar-nav a.active .nav-num { color: var(--accent); }

.sidebar-footer {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-prev-next {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-prev-next a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s;
  padding: 4px 0;
}
.sidebar-prev-next a:hover { color: var(--accent); }
.sidebar-prev-next .pn-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
  display: block;
}

/* ── MAIN ── */
.main { margin-left: 268px; flex: 1; min-width: 0; }

/* ── PAGE HEADER (LIGHT, paper-like) ── */
.page-header {
  background: var(--surface);
  padding: 80px 80px 56px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

.page-header-bg {
  position: absolute;
  right: 56px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 240px;
  font-weight: 700;
  color: var(--surface-2);
  line-height: 1;
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
}

.page-header-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-rule);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  width: fit-content;
  position: relative; z-index: 1;
}
.page-header-chip::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  position: relative; z-index: 1;
  max-width: 720px;
}

.page-header h2 {
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 400;
  color: var(--ink-2);
  font-style: italic;
  position: relative; z-index: 1;
  max-width: 680px;
  line-height: 1.5;
}

/* ── INTRO BAND ── */
.intro-band {
  background: var(--bg);
  padding: 48px 80px;
  border-bottom: 1px solid var(--rule);
}

.intro-text {
  font-family: var(--serif);
  font-size: clamp(19px, 1.8vw, 22px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  max-width: 720px;
  border-left: 3px solid var(--accent);
  padding-left: 24px;
}

/* ── META ROW ── */
.meta-row {
  background: var(--surface);
  padding: 28px 80px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 56px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.meta-item-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.meta-item-value {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  font-weight: 500;
}

/* ── STATS BAR (LIGHT) ── */
.stats-bar {
  display: grid;
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
}

.stats-bar.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stats-bar.cols-4 { grid-template-columns: repeat(4, 1fr); }

.stat-cell {
  padding: 40px 36px;
  border-right: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.stat-cell:last-child { border-right: none; }
.stat-cell::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
}
.stat-cell.in-view::after { transform: scaleX(1); }

.stat-num {
  font-family: var(--serif);
  font-size: clamp(36px, 4.5vw, 54px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.stat-num em {
  color: var(--accent);
  font-style: normal;
}

.stat-desc {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 220px;
  font-weight: 500;
}

/* ── CONTENT SECTIONS ── */
.section-grid {
  background: var(--surface);
  display: grid;
  grid-template-columns: 220px 1fr;
  border-bottom: 1px solid var(--rule);
}

.section-sidebar {
  padding: 48px 24px 48px 80px;
  border-right: 1px solid var(--rule);
  background: var(--bg);
}

.section-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.5;
  position: sticky;
  top: 24px;
}

.section-body {
  padding: 48px 80px 48px 56px;
}

.section-body p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 18px;
  max-width: 680px;
}
.section-body p:last-child { margin-bottom: 0; }
.section-body p strong { color: var(--ink); font-weight: 600; }
.section-body p em { color: var(--ink-2); font-style: italic; }

.section-body h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 36px 0 14px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.section-body h3:first-child { margin-top: 0; }

/* ── LISTS ── */
.dot-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 18px;
  max-width: 660px;
}
.dot-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}
.dot-list li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
}

/* ── CALLOUT ── */
.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent-rule);
  border-radius: 8px;
  padding: 22px 26px;
  margin: 22px 0;
  max-width: 680px;
}
.callout p {
  font-size: 16px !important;
  color: var(--accent) !important;
  font-weight: 500 !important;
  font-style: normal !important;
  margin-bottom: 0 !important;
  line-height: 1.65 !important;
  max-width: none !important;
}

/* ── DECISION LIST ── */
.decision-list {
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  max-width: 640px;
  margin: 18px 0;
  background: var(--surface);
}
.decision-item {
  display: flex;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.decision-item:last-child { border-bottom: none; }
.decision-n {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  min-width: 22px;
}
.decision-t { font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* ── HERO IMAGE ── */
.hero-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

/* ── IMAGE ROW ── */
.img-row {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}
.img-row.cols-2 { grid-template-columns: 1fr 1fr; }
.img-row.cols-1 { grid-template-columns: 1fr; }

.annotated-block {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  max-width: 760px;
  margin: 22px 0;
}
.annotated-block img { width: 100%; display: block; }
.annotation {
  border-top: 1px solid var(--rule);
  padding: 14px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  font-weight: 500;
}

/* ── QUOTE ── */
.quote-block {
  border-left: 3px solid var(--accent-rule);
  padding-left: 22px;
  margin: 22px 0;
  max-width: 640px;
}
.quote-block p {
  font-family: var(--serif) !important;
  font-size: 19px !important;
  font-weight: 400 !important;
  font-style: italic !important;
  color: var(--ink) !important;
  line-height: 1.55 !important;
  max-width: none !important;
  margin-bottom: 0 !important;
}
.quote-block cite {
  font-size: 13px;
  color: var(--ink-3);
  font-style: normal;
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-weight: 500;
}

/* ── SUPPORTING NOTE ── */
.supporting-note {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.65;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  margin-top: 24px;
  max-width: 640px;
}
.supporting-note strong {
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

/* ── PAGE FOOTER (LIGHT) ── */
.page-footer {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding: 32px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-footer span {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.page-footer a {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  letter-spacing: 0.04em;
  font-weight: 500;
  transition: color 0.15s;
}
.page-footer a:hover { color: var(--accent); }

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 3px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .page-header, .intro-band, .meta-row, .section-body, .page-footer { padding-left: 28px; padding-right: 28px; }
  .stats-bar.cols-3, .stats-bar.cols-4 { grid-template-columns: 1fr 1fr; }
  .section-grid { grid-template-columns: 1fr; }
  .section-sidebar { padding: 22px 28px 8px; border-right: none; border-bottom: 1px solid var(--rule); }
  .section-body { padding: 22px 28px 36px; }
  .img-row.cols-2 { grid-template-columns: 1fr; }
}
