/* ===== Danlu Peng — portfolio ===== */
:root{
  --bg:#faf9f7;
  --bg-2:#f1efea;
  --ink:#1b1a18;
  --ink-soft:#5c574f;
  --line:#e2ded6;
  --accent:#8a6f52;
  --maxw:1100px;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#15130f;
    --bg-2:#1e1b16;
    --ink:#ece7dd;
    --ink-soft:#a49c8d;
    --line:#2e2a23;
    --accent:#c7a37a;
  }
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}

/* ---- Layout: fixed sidebar + content ---- */
.layout{display:flex;min-height:100vh}
.sidebar{
  width:250px;flex:0 0 250px;
  padding:52px 34px;
  position:sticky;top:0;height:100vh;
  border-right:1px solid var(--line);
  display:flex;flex-direction:column;
  background:var(--bg);
}
.brand{font-family:var(--serif);line-height:1.05;margin-bottom:6px}
.brand a{display:block}
.brand .en{font-size:34px;font-weight:500;letter-spacing:.01em}
.brand .zh{font-size:20px;color:var(--ink-soft);margin-top:12px;letter-spacing:.16em}
.nav{margin-top:44px;display:flex;flex-direction:column;gap:2px}
.nav a{
  font-size:15px;color:var(--ink-soft);
  padding:7px 0;letter-spacing:.02em;
  border-bottom:1px solid transparent;
  transition:color .2s;
  width:fit-content;
}
.nav a:hover{color:var(--ink)}
.nav a.active{color:var(--ink);border-bottom-color:var(--accent)}
.sidebar .foot{margin-top:auto;font-size:12.5px;color:var(--ink-soft);letter-spacing:.02em}
.sidebar .foot a{border-bottom:1px solid var(--line)}

.content{flex:1;min-width:0;padding:64px clamp(24px,5vw,80px) 120px}
.wrap{max-width:var(--maxw)}

/* ---- Typography blocks ---- */
.eyebrow{font-size:13px;letter-spacing:.18em;text-transform:uppercase;color:var(--accent);margin:0 0 14px}
h1.title{font-family:var(--serif);font-weight:500;font-size:clamp(34px,5vw,56px);line-height:1.05;margin:0 0 10px}
.subtitle{font-size:19px;color:var(--ink-soft);margin:0 0 34px;font-style:italic}
.lead{font-size:20px;line-height:1.6;max-width:64ch}
.prose{max-width:64ch}
.prose p{margin:0 0 22px}
.prose h2{font-family:var(--serif);font-weight:500;font-size:26px;margin:52px 0 4px}
.prose .cap{font-size:14px;color:var(--ink-soft);margin:0 0 20px;letter-spacing:.01em}
.pullquote{
  font-family:var(--serif);font-size:26px;line-height:1.4;font-style:italic;
  border-left:2px solid var(--accent);padding:6px 0 6px 26px;margin:34px 0;max-width:60ch;color:var(--ink)
}
.credits{font-size:13.5px;color:var(--ink-soft);letter-spacing:.02em;margin:26px 0}
.credits span{margin-right:18px;white-space:nowrap}
.sms{background:var(--bg-2);border:1px solid var(--line);border-radius:14px;padding:20px 24px;margin:28px 0;max-width:420px}
.sms p{margin:0 0 8px;font-size:16px}
.sms p:last-child{margin-bottom:0}
.sms .me{color:var(--accent)}

/* ---- Hero (home) ---- */
.hero{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 128px)}
.hero img{max-height:70vh;width:auto;filter:drop-shadow(0 30px 60px rgba(0,0,0,.18))}
.hero-cap{position:absolute;bottom:40px;font-size:13px;color:var(--ink-soft);letter-spacing:.14em;text-transform:uppercase}

/* ---- Gallery ---- */
.gallery{columns:2;column-gap:18px;margin:40px 0 0}
.gallery.cols-3{columns:3}
.gallery figure{margin:0 0 18px;break-inside:avoid;cursor:zoom-in}
.gallery img{width:100%;border-radius:4px;background:var(--bg-2)}
.gallery figcaption{font-size:12.5px;color:var(--ink-soft);margin-top:6px}
@media(max-width:640px){.gallery,.gallery.cols-3{columns:1}}

/* ---- Video ---- */
.video{position:relative;padding-bottom:56.25%;height:0;margin:22px 0 6px;border-radius:6px;overflow:hidden;background:#000}
.video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* ---- Work item (theatre/workshops) ---- */
.item{margin:0 0 60px;max-width:820px}
.item h2{font-family:var(--serif);font-weight:500;font-size:26px;margin:0 0 2px}
.item .role{font-size:14px;color:var(--accent);letter-spacing:.06em;text-transform:uppercase;margin:0 0 14px}
.item p{margin:0 0 14px}

/* ---- CV ---- */
.cv-bio{max-width:66ch;font-size:18px}
.cv-section{margin:44px 0 0}
.cv-section h2{font-family:var(--serif);font-weight:500;font-size:15px;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);margin:0 0 14px;border-bottom:1px solid var(--line);padding-bottom:10px}
.cv-row{display:grid;grid-template-columns:110px 1fr;gap:16px;padding:8px 0;align-items:baseline}
.cv-row .yr{color:var(--ink-soft);font-size:14px;font-variant-numeric:tabular-nums}
.cv-row .desc{font-size:16px}
@media(max-width:560px){.cv-row{grid-template-columns:1fr;gap:2px}}

/* ---- Mobile nav ---- */
.mobile-bar{display:none}
@media(max-width:860px){
  .layout{flex-direction:column}
  .sidebar{position:static;height:auto;width:100%;flex-basis:auto;
    border-right:0;border-bottom:1px solid var(--line);padding:24px 22px}
  .brand .en{font-size:26px}.brand .zh{font-size:16px;margin-top:6px}
  .nav{margin-top:20px;display:none;gap:0}
  .nav.open{display:flex}
  .nav a{padding:9px 0;border-bottom:1px solid var(--line)}
  .sidebar .foot{margin-top:20px}
  .desktop-brand{display:none}
  .mobile-bar{display:flex;justify-content:space-between;align-items:center}
  .menu-btn{background:none;border:1px solid var(--line);color:var(--ink);
    font-size:13px;letter-spacing:.1em;text-transform:uppercase;padding:8px 14px;border-radius:20px;cursor:pointer}
  .content{padding:34px 22px 90px}
  .hero{min-height:60vh}.hero img{max-height:56vh}
}

/* ---- Lightbox ---- */
.lb{position:fixed;inset:0;background:rgba(10,9,8,.94);display:none;
  align-items:center;justify-content:center;z-index:100;cursor:zoom-out;padding:24px}
.lb.open{display:flex}
.lb img{max-width:95vw;max-height:92vh;width:auto;border-radius:4px}
.lb-close{position:absolute;top:20px;right:26px;color:#fff;font-size:30px;line-height:1;cursor:pointer;opacity:.8}
