/* =========================================================
   Shirley He portfolio  |  stylesheet
   ---------------------------------------------------------
   You mostly only need section 1 (colours + fonts).
   Everything else is layout. Search for a class name from
   the HTML to find its styling.
   ========================================================= */


/* ---------- 1. BRAND SETTINGS (edit these) ---------- */
:root {
  /* Brand colours from the Canva template */
  --peach: #f9b286;
  --lime:  #e5ef93;
  --lilac: #f3dcfb;
  --blue:  #c7deff;

  /* Text + background */
  --ink:    #1f1c24;   /* main text */
  --muted:  #5d5866;   /* secondary text */
  --paper:  #fffaf4;   /* page background */
  --line:   #1f1c2422; /* thin borders */

  /* Fonts. To use a different heading font, change --font-display.
     If you get a web licence for "The Youngest", put the file in
     /fonts, add an @font-face below, and list it first here. */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-lg: 32px;
  --radius-md: 20px;
  --max: 1200px;
}


/* ---------- 2. FONTS (self-hosted, no Google calls) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-full-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-full-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}


/* ---------- 3. BASICS ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 420;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: clamp(2.8rem, 7vw, 6rem); }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

em { font-style: italic; }

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: 24px;
}

.section { padding-block: 72px; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.lead { font-size: 1.25rem; color: var(--muted); max-width: 40ch; }


/* ---------- 4. GRADIENT BLOCKS (the Canva look) ---------- */
/* Add one of these classes to any block to colour it. */
.grad-peach {
  background:
    radial-gradient(60% 80% at 85% 15%, var(--lilac) 0%, transparent 70%),
    radial-gradient(70% 90% at 10% 100%, #fcd3b8 0%, transparent 70%),
    var(--peach);
}
.grad-lilac {
  background:
    radial-gradient(60% 80% at 15% 10%, var(--blue) 0%, transparent 70%),
    radial-gradient(60% 80% at 90% 90%, #fff0fb 0%, transparent 70%),
    var(--lilac);
}
.grad-lime {
  background:
    radial-gradient(60% 80% at 90% 10%, #f6fac9 0%, transparent 70%),
    radial-gradient(70% 90% at 0% 100%, var(--blue) 0%, transparent 65%),
    var(--lime);
}
.grad-blue {
  background:
    radial-gradient(60% 80% at 10% 10%, var(--lilac) 0%, transparent 70%),
    radial-gradient(60% 80% at 100% 100%, #e6f0ff 0%, transparent 70%),
    var(--blue);
}
.grad-sunset {
  background:
    radial-gradient(55% 75% at 100% 0%, var(--lilac) 0%, transparent 70%),
    radial-gradient(50% 70% at 0% 100%, var(--lime) 0%, transparent 70%),
    radial-gradient(60% 80% at 50% 50%, #fbc6a4 0%, transparent 80%),
    var(--peach);
}

.block {
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 64px);
}


/* ---------- 5. NAV ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}
.logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.7rem;
  text-decoration: none;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }


/* ---------- 6. BUTTONS + CHIPS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-light { background: transparent; }
.btn-small { padding: 10px 18px; font-size: 0.95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: #ffffffb3;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 500;
}


/* ---------- 7. HERO ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero h1 { margin-bottom: 28px; }
.hero h1 em { color: #7a3f86; }
.hero .lead { color: var(--ink); opacity: .85; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  border-radius: 999px 999px var(--radius-lg) var(--radius-lg); /* arch shape */
  overflow: hidden;
  background: var(--lime);
  border: 1.5px solid var(--ink);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.sticker {
  position: absolute;
  bottom: 28px;
  left: -18px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  transform: rotate(-6deg);
  white-space: nowrap;
}
.portrait-wrap { position: relative; }

.facts { margin-top: 28px; }


/* ---------- 8. SECTION HEADINGS ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-head p { color: var(--muted); max-width: 36ch; margin: 0; }


/* ---------- 9. PROJECT CARDS ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--ink);
  background: #fff;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 6px 8px 0 var(--ink); }
.card-wide { grid-column: 1 / -1; }
.card-image.card-pair {
  aspect-ratio: 4 / 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* minmax(0,1fr) stops the row's auto minimum from overriding aspect-ratio */
  grid-auto-rows: minmax(0, 1fr);
}
.card-pair img { width: 100%; height: 100%; object-fit: cover; }
.card-pair img:first-child { border-right: 1.5px solid var(--ink); }
.card-image {
  /* Lower the second number to make project cards shorter. */
  aspect-ratio: 2 / 1;
  max-width: 100%;
  border-bottom: 1.5px solid var(--ink);
  display: block;
  overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-num { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; }
.card h3 { font-size: clamp(1.35rem, 1.9vw, 1.7rem); }
.card-body p { color: var(--muted); margin: 0; font-size: 0.95rem; line-height: 1.45; }
.card-link { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: 0.95rem; }
.tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--ink);
}
.tag-live { background: var(--lime); }
.tag-building { background: var(--peach); }
.tag-enterprise { background: var(--blue); }


/* ---------- 10. HOW I WORK (three columns) ---------- */
/* Kept on purpose: the How I work section is out of index.html for now.
   Restore the block and these styles still apply. */
.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pillar {
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1.5px solid var(--ink);
}
.pillar h3 { margin-bottom: 12px; }
.pillar p { margin: 0; }
.pillar-num { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; margin-bottom: 36px; display: block; }


/* ---------- 11. ABOUT ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
}
.about-text p:first-of-type {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  font-variation-settings: "SOFT" 100, "opsz" 72;
}


/* ---------- 12. SIDE PROJECT STRIP ---------- */
.strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px 36px;
}
.strip > div { flex: 1 1 420px; }
.strip h3 { font-size: 1.6rem; }
.strip p { margin: 6px 0 0; color: var(--muted); }
.strip-image {
  flex: 0 1 380px;
  width: 380px;
  max-width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--ink);
  display: block;
}


/* ---------- 13. CONTACT ---------- */
.contact { text-align: center; }
.contact h2 { max-width: 16ch; margin: 0 auto 20px; }
.contact .lead { margin: 0 auto 32px; }
.contact .email {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-style: italic;
  text-underline-offset: 6px;
  word-break: break-word;
}
.socials { display: flex; justify-content: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }


/* ---------- 14. FOOTER ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 32px 48px;
  color: var(--muted);
  font-size: 0.95rem;
}


/* ---------- 15. CASE STUDY PAGES ---------- */
.back { font-weight: 700; text-decoration: none; display: inline-block; margin-bottom: 28px; }

.cs-hero h1 { margin-bottom: 20px; }
.cs-hero .lead { color: var(--ink); opacity: .85; max-width: 46ch; }

.meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1.5px solid var(--ink);
}
.meta dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }
.meta dd { margin: 0; font-size: 1rem; }
.meta a { font-weight: 700; }

.cs-image {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--ink);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-width: 100%;
}
.cs-image img { width: 100%; height: 100%; object-fit: cover; }

/* "01 Background / 02 Solution" rows */
.steps { margin-top: 56px; }
.step {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  padding-block: 56px;
  border-top: 1.5px solid var(--ink);
}
.step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  display: block;
  margin-bottom: 12px;
}
.step-body p:last-child { margin-bottom: 0; }
.step-body ul { padding-left: 1.2em; margin: 0; }
.step-body li { margin-bottom: 8px; }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 8px 0 24px;
}
.stat {
  border-radius: var(--radius-md);
  padding: 22px;
  border: 1.5px solid var(--ink);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 420;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 10px;
}
.stat span { font-size: 0.92rem; line-height: 1.4; display: block; }

.note {
  font-size: 0.95rem;
  color: var(--muted);
  border-left: 3px solid var(--peach);
  padding-left: 14px;
}

/* buttons under the case-study intro */
.cs-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* stat cards that hold a short phrase instead of a number */
.stat-text strong { font-size: 1.45rem; line-height: 1.15; }

/* small grey caption under a stat grid or table */
.caption { font-size: 0.92rem; color: var(--muted); }

.next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  text-decoration: none;
}
.next h2 { font-size: clamp(2rem, 4vw, 3.2rem); }


/* ---------- 12b. SPEAKING ---------- */
.events { margin-top: 8px; }
.event {
  display: grid;
  /* Second number sizes the photos. Lower it to shrink them. */
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  padding-block: 56px;
  border-top: 1.5px solid var(--ink);
}
.event-info h3 { margin: 0 0 8px; font-size: 1.8rem; }
.event-info p { margin: 0 0 14px; color: var(--muted); }
.event-info p:last-child { margin-bottom: 0; }
.event-meta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink) !important;
  margin-bottom: 10px !important;
}
.event-venue { font-weight: 500; color: var(--ink) !important; }
.event-shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-content: start;
}
.event-shots img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--ink);
  display: block;
}
.event:has(.event-info:only-child) { grid-template-columns: 1fr; }
.talks-label { margin-top: 56px; }
.also { margin-top: 24px; color: var(--muted); max-width: 60ch; }
.also strong { color: var(--ink); }

/* ---------- 16. MOBILE ---------- */
@media (max-width: 900px) {
  .hero, .about, .step { grid-template-columns: 1fr; gap: 28px; }
  .portrait-wrap { max-width: 300px; }
  .cards, .three { grid-template-columns: 1fr; }
  /* 1/1 on the pair keeps each stacked image at 2:1, same crop as desktop */
  .card-image.card-pair { grid-template-columns: 1fr; aspect-ratio: 1 / 1; }
  .card-pair img:first-child { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .event { grid-template-columns: 1fr; gap: 28px; padding-block: 40px; }
  .event-shots { max-width: 620px; }
  .meta { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: 48px; }
  .step { padding-block: 40px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .nav-links a:not(.btn) { display: none; }
  .sticker { left: 12px; }
  .strip { padding: 24px; }
  .stats, .event-shots { grid-template-columns: 1fr; }
}
