/* ============================================================
   arieltu.com — rebuilt static site
   Look & feel modeled on the original Squarespace template:
   fixed left sidebar (Bebas Neue logotype, two nav groups, the
   "Text" folder opening inline), white ground, light-weight
   geometric sans, left-aligned content column.
   ============================================================ */

:root {
  --ink: #333333;          /* body text */
  --ink-strong: #111111;   /* headings / site title */
  --ink-soft: #777777;     /* meta, captions */
  --ink-muted: #b3b3b3;    /* active nav item */
  --line: #e6e6e6;         /* hairline rules */
  --link: #333333;         /* links are quiet, underline on hover */
  --accent: #1a1a1a;
  --bg: #ffffff;
  --sidebar-w: 260px;
  --max-content: 1100px;
  --max-wide: 1400px;
  --font-stack: "Nunito Sans", "proxima-nova", "Proxima Nova",
                "Helvetica Neue", Helvetica, Arial, "PingFang TC",
                "Microsoft JhengHei", sans-serif;
  --logo-stack: "Bebas Neue", "bebas-neue", "Oswald", "Arial Narrow",
                Impact, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-stack);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
}

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

a { color: var(--link); text-decoration: none; transition: opacity .15s ease; }
a:hover { opacity: .6; }
a:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 2px; }

/* ---------------- Sidebar ---------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  padding: 48px 24px 40px 48px;
  text-align: left;
  overflow-y: auto;
  background: var(--bg);
  z-index: 50;
}

.site-title {
  margin: 0 0 34px;
  font-family: var(--logo-stack);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-strong);
}
.site-title a { color: inherit; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }

/* Tiered nav modeled on the original: bold, larger primary group; a
   clear gap; then noticeably smaller secondary items; folder subitems
   smaller still and indented. */
.site-nav ul.nav-group { margin: 0 0 40px; }
.nav-group > li { margin: 0 0 6px; }

.site-nav a,
.site-nav .nav-folder-toggle {
  font-family: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-block;
  text-align: left;
  font-size: 12px;
  line-height: 1.45;
}

/* Primary group: bold and larger. */
.nav-primary a {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink-strong);
}

.nav-secondary > li { margin: 0 0 4px; }
.nav-secondary a,
.nav-secondary .nav-folder-toggle {
  font-size: 13px;
  font-weight: 400;
  color: #3a3a3a;
}

.site-nav a[aria-current="page"] { color: var(--ink-muted); }
.site-nav a[aria-current="page"]:hover { opacity: 1; }

/* "Text" folder — expands inline within the sidebar: subitems smaller,
   indented, tighter (no extra gap under "Text"). */
.nav-folder {
  display: none;
  margin: 4px 0 10px 14px;
}
.nav-folder li { margin: 0 0 3px; }
.nav-folder a { font-size: 12px; color: var(--ink); }

.has-folder.open .nav-folder { display: block; }
.has-folder.open > .nav-folder-toggle { color: var(--ink-muted); }

/* Social icons */
.social-row {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  margin: 14px 0 0;
}
.social-row a {
  width: 20px; height: 20px;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.social-row svg { width: 18px; height: 18px; fill: currentColor; }

/* Mobile menu */
.menu-toggle {
  display: none;
  margin: 0 auto;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 12px;
}
.menu-toggle .bars { display: inline-block; margin-right: 8px; }
.menu-toggle .bars span {
  display: block; width: 18px; height: 2px;
  background: var(--ink); margin: 3px 0;
}

/* ---------------- Main content ---------------- */

.page {
  margin-left: var(--sidebar-w);
  max-width: var(--max-content);
  padding: 48px 48px 80px;
}
.page--wide { max-width: var(--max-wide); }

.page h2 {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--ink-strong);
  margin: 46px 0 18px;
}
.page h2:first-child { margin-top: 0; }
.page h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-strong);
  margin: 40px 0 12px;
  line-height: 1.5;
}
.page p { margin: 0 0 24px; }

.page hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 44px auto;
  width: 100%;
}

/* About page: portrait beside the bio, like the original. */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 10px 40px;
  align-items: start;
}
.about-portrait { margin: 0; }
.about-bio p { margin: 0 0 20px; }
@media (max-width: 1080px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-portrait { margin: 0 0 28px; }
}

/* Honors list */
.honors-list { list-style: none; padding: 0; margin: 0 0 10px; }
.honors-list li { margin: 0 0 20px; }

/* Work entries (Documentaries etc.) */
.work-entry { margin: 0 0 56px; }
.work-entry .work-title {
  font-size: 14px;
  font-weight: 400;
  margin: 0 0 14px;
  line-height: 1.7;
}
.work-entry .work-title a { font-weight: 600; }
.work-entry .work-note {
  font-weight: 600;
  font-size: 13px;
  margin: 14px 0 0;
}
.work-entry .work-link { font-size: 12px; color: var(--ink-soft); word-break: break-all; }
.work-entry figure { margin: 16px 0 0; }

/* Video embeds — capped so the wider text column doesn't oversize them. */
.video-embed {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  margin: 0 0 42px;
  background: #f2f2f2;
}
.video-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Facebook video plugin: stock embed, as generated by Facebook. */
.fb-embed {
  display: block;
  max-width: 100%;
  border: 0;
  margin: 0 0 42px;
}

/* Static Facebook thumbnail (used where the FB plugin fails to render
   a preview): the whole image links out to the video on Facebook. */
.fb-thumb {
  display: block;
  max-width: 560px;
  margin: 0 0 42px;
}
.fb-thumb img { width: 100%; }
.fb-thumb:hover { opacity: .85; }

/* Play button for the lite YouTube facade */
.yt-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 68px; height: 48px;
  background: rgba(0,0,0,.72);
  border-radius: 10px;
  transition: background .15s ease;
}
.yt-btn::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
}

/* Lite YouTube facade: thumbnail only until the visitor clicks play,
   so pages with many videos load instantly. */
.yt-facade {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; border: 0;
  background: #000;
  cursor: pointer;
}
.yt-facade img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .92;
}
.yt-facade:hover .yt-btn,
.yt-facade:focus-visible .yt-btn { background: #f00; }

/* Episode blocks (TaiwaNYC) */
.episode { margin: 0 0 52px; }
.episode .ep-title { font-size: 13px; font-weight: 400; margin: 0 0 14px; line-height: 1.7; }
.episode .ep-title a { font-weight: 600; }

/* Article link lists (AP / Law&Crime / Chinese) */
.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { margin: 0 0 22px; line-height: 1.65; }
.article-list a { font-weight: 600; }
.article-list--em a { font-style: italic; }
.pub-heading { margin-top: 50px; }
.pub-heading:first-child { margin-top: 0; }

/* Multimedia projects: image on the left, title / excerpt / Read
   button on the right (stacks on small screens). */
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px 40px;
  align-items: start;
  margin: 0 0 84px;
}
.project figure { margin: 0; }
.project .project-info h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
.project .project-info p {
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.project .read-link {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 13px 30px;
}
.project .read-link:hover { opacity: .85; }
@media (max-width: 720px) {
  .project { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------------- Footer ---------------- */

.site-footer {
  margin-left: var(--sidebar-w);
  border-top: 1px solid transparent;
  padding: 10px 48px 56px;
}
.site-footer .social-row { display: none; } /* icons live in the sidebar */

/* ---------------- Mobile: sidebar becomes a top bar ---------------- */

@media (max-width: 900px) {
  .site-header {
    position: static;
    width: auto;
    padding: 24px 5vw 10px;
    text-align: center;
    overflow: visible;
  }
  .site-title { font-size: 30px; margin-bottom: 10px; }
  .menu-toggle { display: block; }
  .site-nav { display: none; }
  .site-nav.open { display: block; padding: 10px 0 4px; }
  .site-nav ul.nav-group { margin: 0 0 14px; }
  .nav-group > li { margin: 0; }
  .site-nav li { text-align: center; }
  .nav-primary a { font-size: 14px; }
  .site-nav a, .site-nav .nav-folder-toggle { padding: 8px 0; font-size: 13px; }
  .nav-folder { margin: 0 0 4px; }
  .nav-folder a { font-size: 12px; }
  .site-header .social-row { justify-content: center; margin-top: 4px; }
  .page, .site-footer { margin-left: 0; }
  .page { padding: 30px 24px 60px; }
}
