:root {
    --bg: #F4F0E6;
    --bg-alt: #E9E2D0;
    --ink: #1C1A18;
    --ink-soft: #4A433D;
    --muted: #8C8275;
    --line: #D9D0BC;
    --accent: #6E2B3A;
    --accent2: #3A3F47;
  }
  body.dark {
    --bg: #14110F;
    --bg-alt: #1C1815;
    --ink: #F0EAD9;
    --ink-soft: #C9BFA8;
    --muted: #86796B;
    --line: #2E2822;
    --accent: #B0525F;
    --accent2: #8C9199;
  }
  body { transition: background 0.3s ease, color 0.3s ease; }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'EB Garamond', serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    font-weight: 400;
  }
  h1, h2, h3 { font-family: 'Cormorant Garamond', serif; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); font-style: italic; }
  .mono { font-family: 'Courier Prime', monospace; }
  a { color: inherit; }

  #nav {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 200px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 40px;
    z-index: 100;
  }
  #nav .brand {
    position: absolute;
    top: 48px; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  #nav .brand img {
    width: 26px; height: 26px;
    border-radius: 50%;
    object-fit: cover;
  }
  #theme-toggle {
    position: absolute;
    top: 90px; left: 50%;
    transform: translateX(-50%);
    width: 26px; height: 26px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0 0 1px 1px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav-label {
    font-family: 'Courier Prime', monospace;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 18px 0 6px 18px;
  }
  .nav-item {
    padding: 10px 0;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--muted);
    border-left: 1px solid var(--line);
    padding-left: 18px;
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  .nav-item.active {
    color: var(--ink);
    border-left: 1px solid var(--ink);
  }
  .nav-item:hover { color: var(--ink); }

  main { margin-left: 0; }

  section {
    padding: 70px 6vw 70px max(6vw, 240px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1600px;
    margin: 0 auto;
    border-bottom: 1px solid var(--line);
  }
  section:last-of-type { border-bottom: none; }
  #hero { padding-top: 100px; padding-bottom: 90px; }

  #hero {
    position: relative;
    align-items: center;
    text-align: center;
  }
  #hero .eyebrow {
    font-family: 'Courier Prime', monospace;
    color: var(--muted);
    font-size: 12.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 24px;
  }
  .hero-portrait {
    width: 160px;
    margin: 0 auto 32px;
  }
  .hero-portrait img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    border: 3px solid var(--bg-alt);
  }
  #hero h1 {
    font-size: clamp(44px, 6vw, 72px);
    line-height: 1.05;
    max-width: 720px;
    margin: 0 auto 24px;
    font-weight: 600;
  }
  #hero p.lede {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 620px;
    margin: 0 auto 44px;
    font-weight: 400;
  }
  .rotator {
    color: var(--accent);
    font-weight: 500;
    transition: opacity 0.3s ease;
  }

  section:not(#hero) h2 {
    font-size: clamp(26px, 3.4vw, 36px);
    margin-bottom: 6px;
    font-weight: 600;
  }
  .section-eyebrow {
    font-family: 'Courier Prime', monospace;
    font-size: 11.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
  }
  section p.intro {
    color: var(--ink-soft);
    font-size: 16px;
    max-width: 560px;
    margin: 14px 0 36px;
  }

  .grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin-bottom: 36px;
    background: var(--line);
    border: 1px solid var(--line);
  }
  .placeholder-img {
    position: relative;
    background: var(--bg);
    aspect-ratio: 4/3;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: var(--muted);
    transition: background 0.25s ease;
  }
  .placeholder-img:hover { background: var(--bg-alt); }
  .placeholder-img span {
    font-family: 'Courier Prime', monospace;
    font-size: 11px;
    padding: 12px;
    color: var(--muted);
  }

  .video-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 16/9;
    background: var(--bg-alt);
    cursor: pointer;
  }
  .video-frame img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.92; }
  .video-frame .play-btn {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 56px; height: 56px;
    background: var(--bg);
    border: 1px solid var(--ink);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s ease;
  }
  .video-frame:hover .play-btn { transform: translate(-50%, -50%) scale(1.06); }
  .video-frame .play-btn svg { margin-left: 3px; }
  .video-frame iframe { width: 100%; height: 100%; border: none; display: block; }

  .meta-block {
    display: flex;
    gap: 48px;
    margin-top: 8px;
    flex-wrap: wrap;
  }
  .tag-group h4 {
    font-family: 'Courier Prime', monospace;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.06em;
    margin-bottom: 10px;
  }
  .tags { display: flex; flex-wrap: wrap; gap: 8px; }
  .tag {
    font-size: 12.5px;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 6px 11px;
  }
  .tag.blue-tag { color: var(--accent); border-color: var(--accent); }

  .alt-bg { background: var(--bg-alt); }

  .exp-block { padding: 26px 0; border-top: 1px solid var(--line); }
  .exp-block:first-of-type { border-top: none; }
  .exp-head {
    display: flex; justify-content: space-between; align-items: baseline;
    flex-wrap: wrap; gap: 8px; margin-bottom: 4px;
  }
  .exp-head h3 { font-size: 18px; font-weight: 600; }
  .exp-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
  .exp-org { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
  .exp-see {
    display: inline-block; margin-top: 12px; font-size: 13px;
    color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent);
    cursor: pointer;
  }

  .flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 30px; }
  .flow-node {
    font-family: 'Courier Prime', monospace; font-size: 12.5px;
    padding: 7px 13px; border: 1px solid var(--line); color: var(--ink);
  }
  .flow-arrow { color: var(--muted); font-size: 14px; }

  .project-block h3 { font-size: 20px; font-weight: 600; }
  .project-block a {
    text-decoration: none; border-bottom: 1px solid var(--accent);
    color: var(--accent); padding-bottom: 1px;
  }

  #contact a {
    color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent);
  }

  .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .reveal.in-view { opacity: 1; transform: translateY(0); }

  #mobile-nav {
    display: none;
  }
  @media (max-width: 900px) {
    #nav { display: none; }
    main { margin-left: 0; }
    section { padding: 48px 22px; }
    #hero { padding-top: 90px; padding-bottom: 60px; }
    video { max-height: 50vh !important; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero-portrait { width: 120px; }
    #hero h1 { font-size: clamp(32px, 9vw, 48px); }
    #hero p.lede { font-size: 16px; padding: 0 6px; }
    .exp-head { flex-direction: column; align-items: flex-start; gap: 4px; }
    .meta-block { gap: 28px; }

    #mobile-nav {
      display: flex;
      position: fixed;
      top: 0; left: 0; right: 0;
      background: var(--bg);
      border-bottom: 1px solid var(--line);
      z-index: 200;
      overflow-x: auto;
      padding: 14px 16px;
      gap: 18px;
      -webkit-overflow-scrolling: touch;
    }
    #mobile-nav::-webkit-scrollbar { display: none; }
    #mobile-nav a {
      font-size: 13px;
      color: var(--muted);
      text-decoration: none;
      white-space: nowrap;
      font-family: 'Courier Prime', monospace;
    }
    #mobile-nav a.active { color: var(--accent); }
    #theme-toggle-mobile {
      flex-shrink: 0;
      width: 26px; height: 26px;
      border: 1px solid var(--line);
      background: var(--bg);
      color: var(--ink);
      border-radius: 50%;
      cursor: pointer;
      font-size: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }