@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --ink: #171717;
  --paper: #f7f5ef;
  --paper-dark: #ece9df;
  --line: #242424;
  --soft-line: #a8a49a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Libre Baskerville", Georgia, serif;
}

.sketch-page {
  min-height: 100vh;
  padding: 34px clamp(18px, 5vw, 84px) 60px;
  background-image: radial-gradient(rgba(23, 23, 23, 0.045) 0.65px, transparent 0.65px);
  background-size: 7px 7px;
}

.sketch-header {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(36px, 7vw, 82px) 0 48px;
  text-align: center;
}

.logo-mark {
  display: inline-block;
  margin-bottom: 20px;
  transform: rotate(-2deg);
  font-family: Kalam, cursive;
  font-size: clamp(3.3rem, 7vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.9;
  text-shadow: 1px 1px 0 var(--paper), 2px 2px 0 var(--ink);
}

.sketch-header h1 {
  max-width: 1120px;
  margin: 0 auto;
  font-size: clamp(1.15rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.35;
}

.authors {
  max-width: 1000px;
  margin: 28px auto 0;
  font-size: clamp(0.85rem, 1.25vw, 1.05rem);
  line-height: 1.9;
}

a { color: inherit; }
.authors a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.authors sup, .affiliations sup { font-size: 0.66em; }

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-top: 11px;
  color: #4e4c47;
  font-size: 0.76rem;
  line-height: 1.75;
}

.notes { margin: 8px auto 0; color: #66635d; font-size: 0.7rem; }

.project-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.project-links a {
  display: inline-flex;
  transition: transform 160ms ease;
}

.project-links a:hover { transform: translateY(-2px) rotate(-1deg); }
.project-links img { height: 22px; }

.sketch-section {
  max-width: 1500px;
  margin: 0 auto;
  padding: 34px 0 58px;
  border-top: 2px solid var(--line);
}

.case-section {
  background: rgba(255, 255, 255, 0.16);
}

.second-section { margin-top: 4px; }

.sketch-section h2 {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.85rem);
  font-weight: 700;
}

.sketch-section h2::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--line);
  transform: rotate(-0.25deg);
}

.prompt {
  max-width: 1000px;
  margin: 16px auto 30px;
  color: #57544d;
  font-size: 0.76rem;
  line-height: 1.75;
  text-align: center;
}

.prompt b { color: var(--ink); }

.sketch-groups {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 6px 18px;
}

.sketch-group {
  flex: 0 0 auto;
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 5px 8px 6px 7px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 3px 3px 0 var(--line);
}

.sketch-group:nth-child(even) { transform: rotate(0.18deg); }
.sketch-group:nth-child(odd) { transform: rotate(-0.14deg); }

.group-ours { background: rgba(255, 255, 255, 0.46); }
.group-baseline { background: var(--paper-dark); }

.sketch-group h3 {
  min-height: 30px;
  margin: 0 0 9px;
  font-family: Kalam, cursive;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.card-row { display: flex; gap: 12px; }

.video-card {
  display: flex;
  flex: 0 0 286px;
  width: 286px;
  flex-direction: column;
  gap: 10px;
  padding: 9px;
  border: 1.5px solid var(--line);
  border-radius: 4px 6px 5px 3px;
  background: var(--paper);
}

.video-card strong {
  font-family: Kalam, cursive;
  font-size: 0.95rem;
  font-weight: 700;
}

.video-card video {
  display: block;
  width: 100%;
  height: 161px;
  border: 1px solid var(--line);
  background: #222;
  object-fit: contain;
}

footer {
  max-width: 1500px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid var(--soft-line);
  font-family: Kalam, cursive;
  font-size: 0.9rem;
  text-align: right;
}

.pipeline-section { padding-top: 34px; }

.method-section {
  margin-top: 0;
  padding: 42px clamp(16px, 3vw, 42px) 70px;
  border: 2px solid var(--line);
  border-radius: 7px 5px 8px 6px;
  background: rgba(236, 233, 223, 0.62);
  box-shadow: 4px 4px 0 var(--line);
}

.method-kicker {
  margin-bottom: 9px;
  color: #6b675e;
  font-family: Kalam, cursive;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.method-lead {
  max-width: 930px;
  margin: 18px 0 26px;
  color: #4e4b45;
  font-size: 0.82rem;
  line-height: 1.85;
}

.method-subheading {
  margin-top: 26px;
  color: #3f3c36;
  font-family: Kalam, cursive;
  font-size: 1.05rem;
  font-weight: 700;
}

.pipeline-videos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 8px 6px 18px;
}

.pipeline-card {
  position: relative;
  width: auto;
  min-width: 0;
}

.pipeline-card video {
  height: auto;
  aspect-ratio: 0.575 / 1;
  object-fit: contain;
}

.step-number {
  position: absolute;
  top: 4px;
  right: 8px;
  color: #656159;
  font-family: Kalam, cursive;
  font-size: 0.82rem;
}

.condition-story {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1.5px dashed var(--soft-line);
}

.condition-intro {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  max-width: 980px;
  margin-bottom: 24px;
}

.story-label {
  font-family: Kalam, cursive;
  font-size: 1.1rem;
  font-weight: 700;
}

.condition-intro p {
  margin: 0;
  color: #4e4b45;
  font-size: 0.78rem;
  line-height: 1.8;
}

.condition-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.condition-column {
  padding: 16px 18px 18px;
  border: 1.5px solid var(--line);
  border-radius: 5px 7px 4px 6px;
  background: rgba(255, 255, 255, 0.26);
}

.condition-column:nth-child(2) { transform: rotate(0.12deg); }

.condition-column-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--soft-line);
}

.condition-column-title span {
  color: #77736a;
  font-family: Kalam, cursive;
  font-size: 0.78rem;
}

.condition-column-title h3 {
  margin: 0;
  font-family: Kalam, cursive;
  font-size: 1.12rem;
}

.condition-item + .condition-item { margin-top: 15px; }
.condition-item h4 { margin: 0 0 5px; font-family: Kalam, cursive; font-size: 0.94rem; }
.condition-item p { margin: 0; color: #4e4b45; font-size: 0.72rem; line-height: 1.75; }

.method-figure {
  margin: 48px 0 0;
  padding-top: 30px;
  border-top: 1.5px dashed var(--soft-line);
}

.figure-frame {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.figure-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.method-figure figcaption {
  max-width: 1120px;
  margin-top: 14px;
  color: #4e4b45;
  font-size: 0.74rem;
  line-height: 1.8;
}

.results-block {
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1.5px dashed var(--soft-line);
}

.results-heading { display: flex; align-items: baseline; gap: 18px; }
.results-heading .method-kicker { margin: 0; }
.results-heading h3 { margin: 0; font-family: Kalam, cursive; font-size: 1.35rem; }
.results-caption { max-width: none; margin: 12px 0 20px; color: #4e4b45; font-size: 0.72rem; line-height: 1.75; white-space: nowrap; overflow-x: auto; }

.table-scroll { overflow-x: auto; border: 1.5px solid var(--line); background: #faf9f4; }
.results-table { min-width: 1180px; width: 100%; border-collapse: collapse; font-family: "Libre Baskerville", Georgia, serif; font-size: 0.64rem; }
.results-table th, .results-table td { padding: 8px 7px; border-bottom: 1px solid #d5d1c6; text-align: center; white-space: nowrap; }
.results-table thead th { background: #e9e5da; font-weight: 700; }
.results-table thead tr:nth-child(2) th { color: #5a574f; font-size: 0.58rem; }
.results-table thead tr:first-child th:first-child,
.results-table tbody tr:not(.table-group) th:first-child { min-width: 190px; text-align: left; }
.results-table tbody th { font-weight: 400; text-align: left; }
.results-table .table-group th { padding-top: 12px; padding-bottom: 6px; color: #68645a; background: #f0ede4; font-family: Kalam, cursive; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; }
.results-table .best { background: #e2cfae; font-weight: 700; }
.results-table .second { background: #eee4cf; }
.table-note { margin: 10px 0 0; color: #77736a; font-size: 0.66rem; line-height: 1.6; }

@media (max-width: 760px) {
  .pipeline-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .condition-intro, .condition-columns { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .pipeline-videos { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sketch-page { padding: 18px 12px 36px; }
  .sketch-header { padding-top: 34px; }
  .sketch-header h1 { font-size: 1.05rem; }
  .affiliations { display: block; }
  .affiliations span { display: block; }
  .sketch-section h2 { display: block; }
  .sketch-section h2::after { display: block; width: 100%; margin-top: 12px; }
  .video-card { flex-basis: 260px; width: 260px; }
  .video-card video { height: 146px; }
}
