/* ===========================================================
   Tiankai Feng — Personal Site
   Design system: bold & colorful, inspired by the
   "Humanizing Data/AI Strategy" book covers.
   =========================================================== */

:root{
  --teal: #12b3a3;
  --teal-dark: #0d8a7d;
  --coral: #ff5f45;
  --coral-dark: #e3462d;
  --yellow: #ffc93d;
  --pink: #ff8fb1;
  --navy: #131a2b;
  --navy-soft: #29314a;
  --cream: #eaf3fb;
  --paper: #ffffff;
  --line: #131a2b;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;

  --shadow-hard: 6px 6px 0 var(--navy);
  --shadow-hard-sm: 4px 4px 0 var(--navy);

  --font-display: 'Plus Jakarta Sans', 'Poppins', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --container: 1120px;
}

@media (prefers-color-scheme: dark){
  :root{
    --cream: #14121a;
    --paper: #1b1824;
    --navy: #fffaf1;
    --navy-soft: #d8d4e6;
    --line: #fffaf1;
    --shadow-hard: 6px 6px 0 #fffaf1;
    --shadow-hard-sm: 4px 4px 0 #fffaf1;
  }
}
:root[data-theme="dark"]{
  --cream: #14121a;
  --paper: #1b1824;
  --navy: #fffaf1;
  --navy-soft: #d8d4e6;
  --line: #fffaf1;
  --shadow-hard: 6px 6px 0 #fffaf1;
  --shadow-hard-sm: 4px 4px 0 #fffaf1;
}
:root[data-theme="light"]{
  --cream: #eaf3fb;
  --paper: #ffffff;
  --navy: #131a2b;
  --navy-soft: #29314a;
  --line: #131a2b;
  --shadow-hard: 6px 6px 0 #131a2b;
  --shadow-hard-sm: 4px 4px 0 #131a2b;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4{
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1{ font-size: clamp(2.6rem, 6vw, 4.6rem); text-transform: uppercase; }
h2{ font-size: clamp(2rem, 4.2vw, 3rem); text-transform: uppercase; }
h3{ font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 700; }
p{ margin: 0 0 1em; }

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

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-hard-sm);
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: .95rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2.5px solid var(--line);
  background: var(--yellow);
  color: var(--navy);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-hard-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover{ transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--line); }
.btn:active{ transform: translate(0,0); box-shadow: 2px 2px 0 var(--line); }
.btn-coral{ background: var(--coral); color: #fff; }
.btn-teal{ background: var(--teal); color: #fff; }
.btn-outline{ background: transparent; }
.btn-sm{ padding: 10px 18px; font-size: .8rem; }

/* ---------- Nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 3px solid var(--line);
}
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .dot{
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--coral);
  border: 2px solid var(--line);
}
.nav-links{
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a{
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid transparent;
}
.nav-links a:not(.btn):hover, .nav-links a:not(.btn).active{
  border-color: var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-hard-sm);
}
.nav-links a.btn.active{ box-shadow: var(--shadow-hard-sm); }
.nav-cta{ display: none; }
.nav-toggle{
  display: none;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span{
  display: block; width: 22px; height: 2.5px; background: var(--line); margin: 4px 0;
}

@media (max-width: 860px){
  .nav-links{
    position: fixed;
    inset: 68px 16px auto 16px;
    flex-direction: column;
    background: var(--paper);
    border: 2.5px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hard);
    padding: 10px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all .2s ease;
  }
  .nav-links.open{ transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a{ display: block; }
  .nav-toggle{ display: block; }
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  padding: 64px 0 90px;
  overflow: hidden;
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-grid .hero-photo-wrap{ order: -1; }
}
.hero h1{ margin-bottom: .3em; }
.hero .lede{
  font-size: 1.2rem;
  color: var(--navy-soft);
  max-width: 46ch;
  margin-bottom: 1.6em;
}
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; }
.hero-photo-wrap{
  position: relative;
  justify-self: center;
}
.hero-photo{
  width: min(420px, 100%);
  border: 3px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  object-fit: cover;
  aspect-ratio: 4/5;
}
.hero-badge{
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--yellow);
  border: 2.5px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  box-shadow: var(--shadow-hard-sm);
  transform: rotate(-6deg);
}
.blob{
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  z-index: -1;
}

/* ---------- Pillars ---------- */
.pillars{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0 10px;
}
.pillar-card{
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  text-decoration: none;
  color: var(--navy);
  box-shadow: var(--shadow-hard-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pillar-card:hover{ transform: translate(-3px,-3px); box-shadow: 8px 8px 0 var(--line); }
.pillar-icon{
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  border: 2px solid var(--line);
  font-size: 1.4rem;
}
.pillar-card h3{ margin-bottom: 0; text-transform: uppercase; }
.pillar-card p{ color: var(--navy-soft); font-size: .95rem; margin-bottom: 0; }
.p-teal .pillar-icon{ background: var(--teal); }
.p-coral .pillar-icon{ background: var(--coral); }
.p-yellow .pillar-icon{ background: var(--yellow); }
.p-pink .pillar-icon{ background: var(--pink); }

@media (max-width: 900px){
  .pillars{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .pillars{ grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
section{ padding: 70px 0; }
.section-head{ max-width: 60ch; margin-bottom: 40px; }
.section-head p{ font-size: 1.1rem; color: var(--navy-soft); }
.bg-navy{ background: var(--navy); color: var(--cream); }
.bg-navy h2, .bg-navy h3{ color: var(--cream); }
.bg-navy .section-head p{ color: #c9c5da; }
.bg-teal{ background: var(--teal); color: #fff; }
.bg-coral{ background: var(--coral); color: #fff; }
.bg-yellow{ background: var(--yellow); color: var(--navy); }
.stripe-top{ border-top: 3px solid var(--line); }
.stripe-bottom{ border-bottom: 3px solid var(--line); }

/* ---------- Cards / grids ---------- */
.card{
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hard-sm);
  overflow: hidden;
}
/* Cards keep dark titles even inside a .bg-navy section, since their own
   background is still light (paper/yellow), not navy. Inline color styles
   (e.g. the coral "Read the books" card) still take precedence over this. */
.bg-navy .card{ color: var(--navy); }
.bg-navy .card h3{ color: var(--navy); }
.grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px){
  .grid-2, .grid-3{ grid-template-columns: 1fr; }
}

/* ---------- Photo gallery / masonry-ish ---------- */
.gallery{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 170px;
  gap: 14px;
}
.gallery figure{
  margin: 0;
  border: 2.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-hard-sm);
}
.gallery img{
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.gallery figure:hover img{ transform: scale(1.06); }
.gallery figcaption{
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(19,26,43,.85), transparent);
  color: #fff;
  font-size: .75rem;
  padding: 22px 10px 8px;
  opacity: 0;
  transition: opacity .2s ease;
}
.gallery figure:hover figcaption{ opacity: 1; }
.gallery .tall{ grid-row: span 2; }
.gallery .wide{ grid-column: span 2; }

@media (max-width: 760px){
  .gallery{ grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gallery .wide{ grid-column: span 2; }
}

/* ---------- Video showcase ---------- */
.video-card{
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}
.video-frame{
  position: relative;
  aspect-ratio: 16/9;
  background: var(--navy);
  cursor: pointer;
}
.video-frame img{ width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-frame .play{
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.video-frame .play span{
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--coral);
  border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  transition: transform .2s ease;
}
.video-frame:hover .play span{ transform: scale(1.08); }
.video-frame iframe{ width: 100%; height: 100%; border: 0; }
.video-meta{ padding: 20px 22px; }
.video-meta .tag{
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid var(--line);
  margin-bottom: 10px;
}
.video-meta h3{ margin-bottom: 6px; }
.video-meta p{ color: var(--navy-soft); margin-bottom: 0; font-size: .95rem; }

/* ---------- Timeline ---------- */
.timeline{ border-left: 3px solid var(--line); padding-left: 28px; margin-left: 6px; }
.timeline-item{ position: relative; padding-bottom: 34px; }
.timeline-item:last-child{ padding-bottom: 0; }
.timeline-item::before{
  content: '';
  position: absolute;
  left: -35px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--coral);
  border: 3px solid var(--line);
}
.timeline-item .when{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--coral-dark);
}
.timeline-item h3{ margin: 4px 0 6px; }
.timeline-item p{ color: var(--navy-soft); margin-bottom: 0; }

/* ---------- Badges / pills row ---------- */
.pill-row{ display: flex; flex-wrap: wrap; gap: 10px; }
.pill{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--paper);
}

/* ---------- Book cards ---------- */
.book-card{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  padding: 26px;
}
.book-card img{
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
}
.book-actions{ display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 700px){
  .book-card{ grid-template-columns: 1fr; }
  .book-card img{ width: 160px; margin: 0 auto; }
}

/* ---------- Quote ---------- */
.quote{
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  max-width: 24ch;
  text-transform: none;
}
.quote-attr{ margin-top: 18px; font-size: .95rem; opacity: .85; font-family: var(--font-body); font-weight: 400; }

/* ---------- Contact ---------- */
.contact-wrap{
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 44px;
  align-items: start;
}
@media (max-width: 860px){ .contact-wrap{ grid-template-columns: 1fr; } }

.form-card{
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  padding: 34px;
}
.field{ margin-bottom: 20px; }
.field label{
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.field input, .field select, .field textarea{
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 2.5px solid var(--line);
  background: var(--cream);
  color: var(--navy);
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline: 3px solid var(--yellow);
  outline-offset: 1px;
}
.hp-field{ position: absolute; left: -9999px; }
.form-note{ font-size: .85rem; color: var(--navy-soft); margin-top: 14px; }

.contact-links{ display: flex; flex-direction: column; gap: 14px; }
.contact-link{
  display: flex; align-items: center; gap: 14px;
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--navy);
  box-shadow: var(--shadow-hard-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  font-weight: 600;
}
.contact-link:hover{ transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--line); }
.contact-link .ic{
  width: 40px; height: 40px; min-width: 40px;
  border-radius: 10px; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */
.site-footer{
  background: var(--navy);
  color: var(--cream);
  padding: 56px 0 28px;
  border-top: 3px solid var(--line);
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h4{
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: .85rem;
  letter-spacing: .08em;
  color: var(--yellow);
  margin-bottom: 14px;
}
.footer-grid ul{ list-style: none; margin: 0; padding: 0; }
.footer-grid li{ margin-bottom: 10px; }
.footer-grid a{ text-decoration: none; color: var(--cream); opacity: .85; }
.footer-grid a:hover{ opacity: 1; text-decoration: underline; }
.footer-bottom{
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 22px;
  font-size: .85rem;
  opacity: .75;
  flex-wrap: wrap; gap: 10px;
}
@media (max-width: 700px){
  .footer-grid{ grid-template-columns: 1fr; }
}

/* ---------- CTA banner ---------- */
.cta-banner{
  border: 3px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--coral);
  color: #fff;
  padding: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-hard);
}
.cta-banner h2{ margin-bottom: 8px; color: #fff; }
.cta-banner p{ margin-bottom: 0; opacity: .95; max-width: 42ch; }

/* ---------- Reveal on scroll ---------- */
.reveal{ opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in{ opacity: 1; transform: translateY(0); }

/* ---------- Page header (inner pages) ---------- */
.page-header{
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
}
.page-header .eyebrow{ margin-bottom: 18px; }
.page-header p.lede{ font-size: 1.15rem; color: var(--navy-soft); max-width: 60ch; }

/* misc */
.center{ text-align: center; }
.mt-lg{ margin-top: 48px; }
.two-col{ display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px){ .two-col{ grid-template-columns: 1fr; } }
