/* ===========================================================
   zhixinwang.me — shared stylesheet
   Recreated from the Webflow original as hand-written HTML/CSS.
   =========================================================== */

/* ---------- 1. tokens ---------- */
:root{
  --bg:#fcfcfc;
  --blue:#2c57b4;        /* primary accent, borders, most type */
  --blue-deep:#2d4a89;   /* active nav link on home */
  --brown:#79674b;       /* case-study body copy */
  --tan:#bba684;         /* case-study meta labels */
  --ink:#0c0904;         /* resume bullet copy */
  --grey:#4d4d4d;        /* nav "work" on subpages */
  --white:#fff;

  --mono:"DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:"DM Sans", system-ui, -apple-system, sans-serif;

  --gutter:0px;         /* original has no container padding */
  --maxw:none;          /* original caps at 90% of viewport, not a px value */
  --nav-h:138px;
}

/* ---------- 2. reset ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  font-family:var(--sans);
  font-weight:300;
  color:var(--blue);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
img{max-width:100%;display:block;border:0}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4,h5,h6,p{margin:0}
:focus-visible{outline:2px solid var(--blue);outline-offset:3px}

/* The Webflow original is simply `max-width:90%` centred — it scales with the
   viewport instead of capping at a pixel width. Matched here. */
.container{
  width:90%;
  max-width:var(--maxw);
  margin:0 auto;
  padding:0;
}
.visually-hidden{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

/* ---------- 3. nav ---------- */
.site-nav{
  height:var(--nav-h);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding-top:41px;
}
.site-nav .brand img{width:77px;height:56px;object-fit:contain}
.nav-links{display:flex;align-items:baseline}
.nav-links a{
  font-family:var(--mono);
  font-size:14px;
  font-weight:400;
  letter-spacing:3px;
  text-transform:lowercase;
  color:#000;
  padding:0 20px;
  transition:color .18s ease;
}
.nav-links a:last-child{padding-right:0}
.nav-links a.is-current{color:var(--grey);font-weight:700}
.nav-links a:hover{color:var(--blue)}

/* home page runs the nav one step larger */
body.home .nav-links a{font-size:16px;color:#000}
body.home .nav-links a.is-current{color:var(--blue-deep);font-weight:400}

/* ---------- 4. footer ---------- */
.site-footer{text-align:center;padding:40px 0 48px}
.site-footer .linkedin{
  display:inline-block;color:var(--blue);margin-bottom:14px;
  transition:opacity .18s ease;
}
.site-footer .linkedin:hover{opacity:.65}
.site-footer .linkedin svg{width:26px;height:26px;display:block}
.site-footer .email{
  display:block;
  font-family:var(--mono);font-size:14px;font-weight:400;
  color:var(--blue);text-decoration:underline;
  margin-bottom:10px;
}
.site-footer .copyright{
  font-family:var(--mono);font-size:12px;font-weight:300;
  color:var(--blue);
}

/* ---------- 5. back to top ---------- */
.back-to-top{
  position:fixed;right:4%;bottom:6%;
  width:60px;height:60px;border-radius:50%;
  background:var(--white);color:var(--blue);
  display:grid;place-items:center;
  font-family:var(--mono);font-size:32px;line-height:1;
  box-shadow:0 2px 14px rgba(44,87,180,.18);
  opacity:0;visibility:hidden;
  transition:opacity .25s ease, visibility .25s ease, transform .18s ease;
  z-index:40;
}
.back-to-top.is-visible{opacity:1;visibility:visible}
.back-to-top:hover{transform:translateY(-2px)}

/* ===========================================================
   HOME
   =========================================================== */
.intro{display:flex;align-items:flex-start;padding-bottom:40px}
.intro-left{width:60%;margin:0 60px 0 100px}          /* original: .div-block-hi */
.upper-intro{display:flex;align-items:baseline}
.intro-label{font-family:var(--mono);font-size:16px;line-height:32px;color:var(--blue)}
.intro-name{
  font-family:var(--mono);font-size:34px;font-weight:500;
  line-height:32px;margin-left:20px;color:var(--blue);
}
.lower-intro{display:flex;align-items:baseline;margin-top:40px}
.intro-titles{display:block}
/* The original uses text-decoration, not a border, so the dotted rule is
   exactly as wide as the text. */
.intro-title{
  font-family:var(--mono);font-size:24px;font-weight:500;line-height:32px;
  color:var(--blue);
  align-self:flex-start;
  margin:0 0 20px 20px;
  text-decoration:underline dotted;
  text-underline-offset:7px;
}
/* an image can't take text-decoration, so match it with a hugging border */
.intro-title.is-image{
  margin-bottom:0;
  text-decoration:none;
  display:inline-block;
  padding-bottom:7px;
  border-bottom:1px dotted var(--blue);
}
.intro-title.is-image img{width:282px;height:75px;object-fit:contain}

.intro-right{width:60%;margin-right:100px;display:flex;flex-direction:column;align-items:center}
.intro-collage{width:402px;height:326px;object-fit:contain}
.intro-copy{
  font-family:var(--mono);font-size:14px;font-weight:300;line-height:20px;
  color:var(--blue);text-align:center;margin-top:40px;
}
.intro-copy p + p{margin-top:20px}
.intro-arrow{width:134px;height:103px;object-fit:contain;margin-left:120px}

.work-grid{
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:40px 30px;padding-bottom:64px;
}
.work-card{
  display:block;border:2px solid var(--blue);background:var(--bg);
  transition:transform .25s ease, box-shadow .25s ease;
}
.work-card:hover{transform:translateY(-3px);box-shadow:0 8px 0 -2px rgba(44,87,180,.18)}
.work-card__media{aspect-ratio:633/364;overflow:hidden;border-bottom:2px solid var(--blue)}
.work-card__media img{width:100%;height:100%;object-fit:cover}
.work-card__title{
  font-family:var(--mono);font-size:22px;font-weight:500;line-height:1.2;
  color:var(--blue);text-align:center;padding:20px 12px;
  border-bottom:2px solid var(--blue);
}
.work-card__tags{display:grid;grid-template-columns:repeat(3,1fr)}
.work-card__tags span{
  font-family:var(--mono);font-size:14px;font-weight:300;
  color:var(--blue);text-align:center;padding:14px 6px;
}
.work-card__tags span + span{border-left:2px solid var(--blue)}

/* ===========================================================
   ABOUT
   =========================================================== */
.about-hero{display:flex;align-items:flex-start;gap:0;padding:40px 0}
.about-hero__text{width:50%;padding-right:20px}       /* original: .div-block-12 */
.about-lede{
  font-family:var(--mono);font-size:18px;font-weight:600;line-height:26px;
  color:var(--blue);max-width:628px;
}
.about-body{
  font-family:var(--sans);font-size:14px;font-weight:400;line-height:20px;
  color:var(--blue);max-width:628px;margin-top:24px;
}
.about-hero__photo{width:50%}                         /* original: .div-block-11 */
.about-hero__photo img{mix-blend-mode:multiply}        /* original: .image-7 */

.about-works-heading{
  font-family:var(--mono);font-size:24px;font-weight:400;line-height:44px;
  color:var(--blue);
  padding:40px 0 23px;
  border-bottom:.5px solid var(--brown);   /* original: .5px solid, not dotted blue */
  width:100%;max-width:none;
}

.gallery{display:flex;align-items:flex-start;gap:40px;padding:52px 0 40px}
.gallery-sticky{
  width:405px;flex:0 0 auto;
  position:sticky;top:80px;
  display:flex;flex-direction:column;
}
.gallery-link{
  font-family:var(--mono);font-size:20px;font-weight:300;line-height:32px;
  color:var(--blue);margin-bottom:35px;
  transition:font-weight .15s ease, opacity .15s ease;
}
.gallery-link:hover{opacity:.7}
.gallery-link.is-active{font-size:24px;font-weight:600}
.gallery-items{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:64px}
.gallery-item{scroll-margin-top:100px}
.gallery-item__caption{
  font-family:var(--mono);font-size:12px;font-weight:300;
  color:var(--blue);margin-top:10px;
}
.gallery-embed{position:relative;width:100%;aspect-ratio:16/9;background:#e9e9e9}
.gallery-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* ===========================================================
   RESUME
   =========================================================== */
.resume{padding-bottom:40px}
.resume-download{display:flex;justify-content:center;padding:0 0 8px}
.btn{
  display:inline-block;
  background:var(--blue);color:var(--white);
  font-family:var(--sans);font-size:16px;font-weight:400;line-height:20px;
  padding:13px 24px;border-radius:20px;min-width:220px;text-align:center;
  transition:opacity .18s ease, transform .18s ease;
}
.btn:hover{opacity:.9;transform:translateY(-1px)}

.resume-inner{padding-left:68px}
.resume h1{
  font-family:var(--mono);font-size:38px;font-weight:700;line-height:44px;
  color:var(--blue);margin:20px 0 10px;
}
.resume h1.light{font-weight:500}
.resume h2{
  font-family:var(--mono);font-size:32px;font-weight:700;line-height:36px;
  color:var(--blue);
}
.resume h3{
  font-family:var(--sans);font-size:24px;font-weight:700;line-height:30px;
  color:var(--blue);margin-top:8px;
}
.resume h5{
  font-family:var(--sans);font-size:14px;font-weight:700;line-height:20px;
  color:var(--blue);margin-bottom:10px;
}
.resume .paragraph{
  font-family:var(--sans);font-size:16px;font-weight:400;line-height:20px;
  color:var(--ink);margin-bottom:10px;max-width:940px;
}
.resume .spacer{height:20px}
/* The live site hides this duplicated bullet with opacity:0 (.paragraph.zero).
   Kept faithful — delete the element from resume.html if you want it gone. */
.resume .paragraph.zero{opacity:0}
.resume-entry{margin-bottom:34px}

/* ===========================================================
   CASE STUDY
   =========================================================== */
.case-hero{
  height:300px;
  background-size:cover;
  background-position:50% 90%;
  background-repeat:no-repeat;
  background-color:#0d1b34;
}
.case-hero.garda{background-position:50% 90%}
.case-hero.terra{background-position:50% 50%}
.case-hero.polestar{background-position:50% 50%}
.case-hero.secureu{background-position:50% 50%}

.case-intro{padding:40px 0 0}
.case-intro h1{
  font-family:var(--mono);font-size:38px;font-weight:700;line-height:44px;
  color:var(--blue);
}
.case-tagline{
  font-family:var(--sans);font-size:16px;font-weight:300;line-height:20px;
  color:var(--brown);margin-top:10px;max-width:1100px;
}

.case-meta{
  display:flex;justify-content:space-between;align-items:flex-start;
  gap:32px;padding:35px 0 40px;
}
.case-meta__col{flex:1 1 0;text-align:center}
.case-meta__label{
  font-family:var(--sans);font-size:14px;font-weight:400;line-height:20px;
  color:var(--tan);
}
.case-meta__value{
  font-family:var(--sans);font-size:16px;font-weight:300;line-height:20px;
  color:var(--brown);
}

.case-section-label{
  font-family:var(--sans);font-size:18px;font-weight:700;line-height:24px;
  color:var(--blue);
}
.case-caption{
  font-family:var(--sans);font-size:16px;font-weight:300;line-height:20px;
  color:var(--brown);margin-top:4px;padding-bottom:20px;
}

.case-video{position:relative;width:100%;aspect-ratio:16/9;background:#000}
.case-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

.case-body img{width:100%;height:auto}

/* --- storyboard slider --- */
.slider{position:relative;height:350px;overflow:hidden;background:#0d1b34}
.slider__track{display:flex;height:100%;transition:transform .45s cubic-bezier(.4,0,.2,1)}
.slider__slide{
  flex:0 0 100%;height:100%;
  background-size:cover;background-position:center;background-repeat:no-repeat;
}
.slider__arrow{
  position:absolute;top:0;bottom:0;width:80px;
  display:grid;place-items:center;
  background:none;border:0;cursor:pointer;
  color:var(--white);font-size:30px;line-height:1;
  text-shadow:0 1px 6px rgba(0,0,0,.5);
  transition:background .18s ease;
}
.slider__arrow:hover{background:rgba(0,0,0,.14)}
.slider__arrow--prev{left:0}
.slider__arrow--next{right:0}
.slider__dots{
  display:flex;justify-content:center;align-items:center;gap:10px;
  height:40px;
}
.slider__dots button{
  width:10px;height:10px;padding:0;border-radius:50%;
  border:1px solid var(--blue);background:transparent;cursor:pointer;
  transition:background .18s ease;
}
.slider__dots button[aria-selected="true"]{background:var(--blue)}

/* --- prev / next project bar --- */
.project-nav{
  display:flex;align-items:center;justify-content:space-between;
  gap:24px;padding:60px 0;
}
.project-nav__side{
  display:flex;align-items:center;gap:12px;
  font-family:var(--sans);font-size:18px;font-weight:400;
  color:var(--blue);
  transition:opacity .18s ease;
}
.project-nav__side:hover{opacity:.65}
/* first/last project: the original hides the dead end with opacity:0 but keeps
   its box, so the centre group stays centred. Same here. */
.project-nav__side.is-hidden{opacity:0;pointer-events:none}
.project-nav__side.is-hidden:hover{opacity:0}
.project-nav__chevron{font-size:22px;line-height:1}
.project-nav__center{
  display:flex;align-items:center;gap:20px;flex-wrap:wrap;justify-content:center;
}
.project-nav__center .current-project{
  font-family:var(--sans);font-size:16px;font-weight:400;color:#806f55;
}
.project-nav__center a{
  font-family:var(--sans);font-size:14px;font-weight:700;color:var(--blue);
  transition:opacity .18s ease;
}
.project-nav__center a:hover{opacity:.65}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width:991px){
  .intro{flex-direction:column;align-items:center;gap:56px}
  .intro-left{margin:0;width:100%;max-width:518px}
  .intro-right{width:100%;max-width:518px}
  .intro-arrow{margin-left:0}
  .about-hero{flex-direction:column;gap:40px}
  .about-hero__text,.about-hero__photo{width:100%}
  .gallery{flex-direction:column;gap:32px}
  .gallery-sticky{position:static;width:100%;flex-direction:row;flex-wrap:wrap;gap:24px}
  .gallery-link{margin-bottom:0;font-size:16px}
  .resume-inner{padding-left:0}
}
@media (max-width:767px){
  :root{--nav-h:auto}
  .container{width:92%}
  .site-nav{flex-direction:column;align-items:flex-start;gap:16px;padding:24px 0 8px}
  .nav-links{margin-left:-20px}
  .upper-intro{width:100%;flex-wrap:wrap}
  .intro-name{margin-left:0;font-size:28px}
  .intro-title{width:auto;max-width:270px;font-size:20px;margin-left:12px}
  .intro-title.is-image img{width:100%;max-width:240px;height:auto}
  .intro-collage{width:100%;height:auto}
  .work-grid{grid-template-columns:1fr}
  .case-intro h1,.resume h1{font-size:28px;line-height:34px}
  .resume h2{font-size:24px;line-height:30px}
  .resume h3{font-size:19px;line-height:26px}
  .case-meta{flex-direction:column;gap:24px}
  .case-meta__col{text-align:left}
  .project-nav{flex-direction:column;gap:24px}
  .slider{height:220px}
  .back-to-top{right:20px;bottom:20px;width:48px;height:48px;font-size:24px}
}
