/* ============================================================
   Jasmine Chou — portfolio
   Design constitution: clean, warm, crafted.
   The type scale, 8pt spacing rhythm, 720px measure, and radius
   values are Kiwi's own documented tokens — the site follows the
   rules of the design system it showcases.
   ============================================================ */

:root {
  /* surfaces & ink */
  --paper: #faf6f0;        /* warm cream */
  --card: #ffffff;
  --ink: #211d18;
  --ink-soft: #6f675d;
  --line: #e7dfd3;

  /* accent — pale blue pulled toward emmiwu warmth */
  --accent: #2c5e8f;
  --accent-soft: #dce9f5;

  /* placeholder alarm */
  --todo-bg: #fff3bf;
  --todo-border: #d9a400;

  /* kiwi type scale (text-base → text-4xl) */
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --measure: 720px;   /* kiwi max content width */
  --radius: 6px;      /* kiwi .rounded */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "General Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- nav ---------- */
header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 0;
}
header.site .wordmark {
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--ink);
  text-decoration: none;
}
header.site nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 24px;
  font-size: var(--text-sm);
}
header.site nav a:hover { color: var(--accent); }

/* ---------- article scaffold ---------- */
main.case {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.kicker {
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

h1 {
  font-size: var(--text-4xl);
  line-height: 1.15;
  margin: 0 0 8px;
  font-weight: 600;
}
.subtitle {
  font-size: var(--text-xl);
  color: var(--ink-soft);
  margin: 0 0 32px;
  font-weight: 400;
}

/* hand-drawn underline under the h1 */
.scribble { display: block; margin: 4px 0 40px; }
.scribble path {
  stroke: var(--accent);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
}

/* meta strip: role / team / timeline */
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  padding: 16px 0 !important;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 48px;
  list-style: none;
  padding-left: 0;
}
.meta div dt {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.meta div dd { margin: 0; font-size: var(--text-base); }

/* skim block — the 30-second version */
.tldr {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0 0 64px;
}
.tldr h2 { margin-top: 0; }
.tldr dt { font-weight: 600; margin-top: 16px; }
.tldr dt:first-of-type { margin-top: 0; }
.tldr dd { margin: 4px 0 0; color: var(--ink); }

/* sections — kiwi spacing rhythm */
section { margin-bottom: 64px; }
h2 {
  font-size: var(--text-2xl);
  line-height: 1.3;
  margin: 0 0 16px;   /* kiwi: 16px title → first content */
  font-weight: 600;
}
h3 {
  font-size: var(--text-lg);
  margin: 40px 0 8px;  /* kiwi: 40px between questions */
  font-weight: 600;
}
p { margin: 0 0 16px; }
ul { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }

a { color: var(--accent); }

/* pull quotes from research */
blockquote {
  margin: 24px 0;
  padding: 16px 24px;
  border-left: 3px solid var(--accent);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: var(--text-lg);
  line-height: 1.45;
}
blockquote p { margin: 0 0 8px; }
blockquote footer {
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

/* figures */
figure {
  margin: 32px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
figure img { max-width: 100%; height: auto; display: block; border-radius: 3px; }
figcaption {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  padding-top: 12px;
}

/* loud placeholder — never ships silently */
.todo {
  background: var(--todo-bg);
  border: 2px dashed var(--todo-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

/* footer */
footer.site {
  border-top: 1px solid var(--line);
  margin-top: 96px;
}
footer.site .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
footer.site a { color: var(--ink-soft); margin-right: 20px; }
footer.site a:hover { color: var(--accent); }

/* blinking presence dot — city / time / weather */
.presence { display: flex; align-items: center; gap: 8px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3fa34d;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(63,163,77,.5); }
  50% { opacity: .55; box-shadow: 0 0 0 5px rgba(63,163,77,0); }
}

@media (max-width: 600px) {
  h1 { font-size: var(--text-3xl); }
  .meta { gap: 8px 24px; }
}

/* ---------- homepage ---------- */
.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 96px 24px 64px;
}
.hero h1 {
  font-size: var(--text-3xl);
  max-width: 640px;
  font-weight: 600;
}
.hero p {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 560px;
}

.projects {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 64px;
  list-style: none;
}
.projects li { margin: 0; }
.projects a.row, .projects .row {
  display: block;
  padding: 28px 8px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.projects li:last-child .row { border-bottom: 1px solid var(--line); }
.projects a.row:hover { background: var(--card); }
.projects a.row:hover .title { color: var(--accent); }
.row .tag {
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.row .title {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin: 0 0 6px;
}
.row .blurb {
  color: var(--ink-soft);
  margin: 0;
  max-width: 640px;
}
.soon {
  font-size: var(--text-sm);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 12px;
  white-space: nowrap;
}
.projects .row.teaser { opacity: 0.75; }

/* ---------- dark mode (early-morning note flips it) ---------- */
:root[data-theme="dark"] {
  --paper: #1a1713;
  --card: #24201b;
  --ink: #efe9e1;
  --ink-soft: #a89e91;
  --line: #3a342b;
  --accent: #8ab4dd;
  --accent-soft: #263646;
}
.todo { color: #3a3000; } /* stays readable on yellow in both themes */

/* ---------- sticky-note collage hero ---------- */
/* Notes sit on a fixed 640x380 "stage" and cluster/overlap like the
   emmiwu reference. On smaller screens the whole stage scales down as a
   unit (transform), so the collage never breaks apart or stretches. */
.notes-wrap {
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding: 48px 16px 12px;
}
.notes {
  position: relative;
  width: 640px;
  height: 380px;
  flex: none;
  transform-origin: top center;
}
.note {
  position: absolute;
  border-radius: 4px;
  padding: 26px;
  box-shadow: 0 12px 30px rgba(30, 22, 10, 0.14);
  line-height: 1.4;
}
.note-big {
  top: 44px;
  left: 0;
  width: 372px;
  transform: rotate(-4deg);
  background: #a9bd8b;          /* sage — swapped from emmi's orange */
  color: #222b16;
  font-size: var(--text-xl);
  font-weight: 500;
}
.note-big .hi {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: 8px;
}
.note-lang {
  position: absolute;
  top: 0;
  left: 350px;                  /* overlaps sage's top-right corner */
  transform: rotate(6deg);
  background: #de5f38;          /* the orange moved here */
  color: #fdf3ec;
  font-size: var(--text-3xl);
  font-weight: 600;
  padding: 22px 30px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(30, 22, 10, 0.14);
}
.note-lang:hover { transform: rotate(6deg) scale(1.06); }
.note-wide {
  top: 214px;
  left: 232px;                  /* overlaps sage's bottom-right */
  width: 388px;
  transform: rotate(-3deg);
  background: #cfe0f2;          /* pale blue */
  color: #23384d;
  font-size: var(--text-lg);
}
.note-blank {
  top: 236px;
  left: 150px;                  /* tucked at bottom-left under the blue */
  width: 96px;
  height: 96px;
  transform: rotate(9deg);
  background: #f2d8cf;          /* soft pink placeholder square */
}
.hero-sub {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 24px 48px;
  color: var(--ink-soft);
  font-size: var(--text-base);
}
.hero-sub p { max-width: 560px; margin: 0; }

@media (max-width: 700px) {
  .notes { transform: scale(0.72); margin-bottom: -106px; }
}
@media (max-width: 500px) {
  .notes-wrap { padding-top: 28px; }
  .notes { transform: scale(0.52); margin-bottom: -182px; }
}

/* ---------- work grid (two-column cards with hero images) ---------- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 32px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 72px;
  list-style: none;
}
.work-grid li { margin: 0; }
.card { display: block; text-decoration: none; color: inherit; }
.card .thumb {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: 14px;
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
a.card:hover .thumb img { transform: scale(1.03); }
a.card:hover .title { color: var(--accent); }
.card .tag {
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.card .title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: 0 0 6px;
}
.card .blurb { color: var(--ink-soft); margin: 0; font-size: var(--text-base); }
.card.teaser { opacity: 0.82; }
.thumb-tile {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: var(--text-2xl);
  font-weight: 600;
  color: #23384d;
  background: linear-gradient(135deg, #cfe0f2 0%, #e8f0e0 100%);
}
@media (max-width: 700px) {
  .work-grid { grid-template-columns: 1fr; gap: 40px; }
}
