  :root{
    --bg:#F1EEE7;
    --panel:#E8E3D8;
    --ink:#1B1E24;
    --muted:#6B6A63;
    --accent:#A85F1E;
    --accent-ink:#F1EEE7;
    --sage:#4F7A63;
    --line:#D8D2C4;
    --shadow:none;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      --bg:#14171C;
      --panel:#1B1F26;
      --ink:#E9E7DF;
      --muted:#8B92A0;
      --accent:#E8A33D;
      --accent-ink:#14171C;
      --sage:#7FB89A;
      --line:#2A2F3A;
    }
  }
  :root[data-theme="dark"]{
    --bg:#14171C;
    --panel:#1B1F26;
    --ink:#E9E7DF;
    --muted:#8B92A0;
    --accent:#E8A33D;
    --accent-ink:#14171C;
    --sage:#7FB89A;
    --line:#2A2F3A;
  }

  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;scroll-padding-top:66px;}
  @media (prefers-reduced-motion: reduce){
    html{scroll-behavior:auto;}
    *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important;}
  }

  body{
    margin:0;
    background:var(--bg);
    color:var(--ink);
    font-family:'Inter',system-ui,-apple-system,sans-serif;
    font-size:16px;
    line-height:1.6;
    -webkit-font-smoothing:antialiased;
  }

  h1,h2,h3{
    font-family:'Fraunces',Georgia,serif;
    font-weight:500;
    line-height:1.15;
    margin:0;
    letter-spacing:-0.01em;
  }

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

  .wrap{
    max-width:1120px;
    margin:0 auto;
    padding:0 28px;
  }

  code, .mono{font-family:'IBM Plex Mono',ui-monospace,monospace;}

  /* ---------- nav ---------- */
  .nav{
    position:sticky;
    top:0;
    z-index:50;
    background:color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter:blur(8px);
    border-bottom:1px solid var(--line);
  }
  .nav-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    height:66px;
  }
  .brand{
    font-family:'Fraunces',serif;
    font-size:1.05rem;
    font-weight:500;
    text-decoration:none;
    letter-spacing:-0.01em;
  }
  .brand .dot{color:var(--accent);}
  .nav-links{
    display:flex;
    gap:28px;
    list-style:none;
    margin:0;
    padding:0;
  }
  .nav-links a{
    text-decoration:none;
    font-size:0.92rem;
    color:var(--muted);
    transition:color .15s ease;
  }
  .nav-links a:hover, .nav-links a:focus-visible{color:var(--ink);}
  .nav-cta{
    font-size:0.88rem;
    padding:9px 16px;
    border:1px solid var(--ink);
    border-radius:3px;
    text-decoration:none;
    color:var(--ink);
    white-space:nowrap;
    transition:background .15s ease, color .15s ease;
  }
  .nav-cta:hover, .nav-cta:focus-visible{background:var(--ink);color:var(--bg);}
  .nav-toggle{display:none;background:none;border:0;color:var(--ink);cursor:pointer;padding:6px;}
  .nav-toggle svg{width:22px;height:22px;}

  @media (max-width:760px){
    .nav-links{
      position:absolute;
      top:66px;left:0;right:0;
      flex-direction:column;
      background:var(--bg);
      border-bottom:1px solid var(--line);
      padding:18px 28px 26px;
      gap:16px;
      display:none;
    }
    .nav-links.open{display:flex;}
    .nav-toggle{display:block;}
    .nav-cta{display:none;}
  }

  /* ---------- hero ---------- */
  .hero{
    padding:88px 0 96px;
  }
  .hero-grid{
    display:grid;
    grid-template-columns:1.15fr 0.85fr;
    gap:64px;
    align-items:center;
  }
  .kicker{
    font-family:'IBM Plex Mono',monospace;
    font-size:0.82rem;
    color:var(--accent);
    margin:0 0 18px;
  }
  .hero h1{
    font-size:clamp(2.1rem, 4.4vw, 3.4rem);
    max-width:14ch;
  }
  .hero-lede{
    margin:26px 0 34px;
    max-width:48ch;
    color:var(--muted);
    font-size:1.08rem;
  }
  .hero-ctas{display:flex;gap:14px;flex-wrap:wrap;}
  .btn{
    display:inline-block;
    padding:13px 22px;
    border-radius:3px;
    text-decoration:none;
    font-size:0.95rem;
    font-weight:500;
    transition:opacity .15s ease, background .15s ease, color .15s ease;
  }
  .btn-primary{background:var(--ink);color:var(--bg);}
  .btn-primary:hover, .btn-primary:focus-visible{opacity:0.82;}
  .btn-ghost{border:1px solid var(--line);color:var(--ink);}
  .btn-ghost:hover, .btn-ghost:focus-visible{border-color:var(--ink);}

  /* terminal status panel */
  .term{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:6px;
    overflow:hidden;
    box-shadow:0 20px 50px -30px rgba(0,0,0,0.35);
  }
  .term-bar{
    display:flex;
    align-items:center;
    gap:8px;
    padding:11px 14px;
    border-bottom:1px solid var(--line);
  }
  .term-dot{width:9px;height:9px;border-radius:50%;background:var(--line);}
  .term-path{
    margin-left:8px;
    font-family:'IBM Plex Mono',monospace;
    font-size:0.78rem;
    color:var(--muted);
  }
  .term-body{padding:20px 20px 22px;font-family:'IBM Plex Mono',monospace;font-size:0.88rem;}
  .term-row{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:8px 0;
    border-bottom:1px solid var(--line);
    opacity:0;
    animation:termIn .5s ease forwards;
  }
  .term-row:last-child{border-bottom:0;}
  .term-row:nth-child(1){animation-delay:.05s;}
  .term-row:nth-child(2){animation-delay:.18s;}
  .term-row:nth-child(3){animation-delay:.31s;}
  .term-row:nth-child(4){animation-delay:.44s;}
  @keyframes termIn{
    from{opacity:0; transform:translateY(4px);}
    to{opacity:1; transform:translateY(0);}
  }
  .term-k{color:var(--muted);}
  .term-v{color:var(--ink);font-weight:500;}
  .term-v.status::before{
    content:'';
    display:inline-block;
    width:7px;height:7px;
    border-radius:50%;
    background:var(--sage);
    margin-right:7px;
    box-shadow:0 0 0 3px color-mix(in srgb, var(--sage) 25%, transparent);
  }

  @media (max-width:860px){
    .hero-grid{grid-template-columns:1fr;gap:44px;}
  }

  /* ---------- section shell ---------- */
  section{padding:88px 0;border-top:1px solid var(--line);}
  .sec-head{max-width:56ch;margin-bottom:52px;}
  .sec-label{
    font-family:'IBM Plex Mono',monospace;
    font-size:0.8rem;
    color:var(--accent);
    margin:0 0 14px;
  }
  .sec-head h2{font-size:clamp(1.5rem,2.6vw,2rem);max-width:20ch;}
  .sec-head p{color:var(--muted);margin:16px 0 0;}

  /* ---------- about ---------- */
  .about-body{display:grid;grid-template-columns:1fr 1fr;gap:56px;}
  .about-body p{color:var(--muted);margin:0 0 18px;}
  .about-body p:last-child{margin-bottom:0;}
  .about-fact{border-left:2px solid var(--accent);padding-left:18px;margin-bottom:24px;}
  .about-fact dt{font-family:'IBM Plex Mono',monospace;font-size:0.78rem;color:var(--muted);margin-bottom:4px;}
  .about-fact dd{margin:0;font-size:0.98rem;}
  @media (max-width:760px){.about-body{grid-template-columns:1fr;gap:30px;}}

  /* ---------- experience ---------- */
  .tl{border-left:1px solid var(--line);margin-left:6px;}
  .tl-item{position:relative;padding:0 0 44px 32px;}
  .tl-item:last-child{padding-bottom:0;}
  .tl-item::before{
    content:'';
    position:absolute;
    left:-5px; top:4px;
    width:9px;height:9px;
    border-radius:50%;
    background:var(--bg);
    border:2px solid var(--accent);
  }
  .tl-meta{
    display:flex;
    flex-wrap:wrap;
    gap:10px 16px;
    align-items:baseline;
    margin-bottom:8px;
  }
  .tl-role{font-family:'Fraunces',serif;font-size:1.15rem;font-weight:500;}
  .tl-date{font-family:'IBM Plex Mono',monospace;font-size:0.8rem;color:var(--muted);}
  .tl-org{color:var(--accent);font-size:0.92rem;margin-bottom:10px;}
  .tl-item p{color:var(--muted);max-width:62ch;margin:0;}

  /* ---------- projects ---------- */
  .proj-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
  }
  .proj-card{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:6px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }
  .proj-bar{
    display:flex;
    align-items:center;
    gap:7px;
    padding:10px 13px;
    border-bottom:1px solid var(--line);
  }
  .proj-dot{width:8px;height:8px;border-radius:50%;background:var(--line);}
  .proj-url{
    margin-left:6px;
    font-family:'IBM Plex Mono',monospace;
    font-size:0.76rem;
    color:var(--muted);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .proj-image{width:100%;aspect-ratio:16 / 9;object-fit:cover;background:var(--line);border-bottom:1px solid var(--line);}
  .proj-body{padding:18px 18px 20px;flex:1;display:flex;flex-direction:column;}
  .proj-body h3{font-size:1.02rem;margin-bottom:8px;}
  .proj-body p{color:var(--muted);font-size:0.92rem;margin:0 0 16px;flex:1;}
  .proj-link{align-self:flex-start;color:var(--accent);font-family:'IBM Plex Mono',monospace;font-size:0.76rem;text-decoration:none;margin-bottom:16px;}
  .proj-link:hover, .proj-link:focus-visible{text-decoration:underline;text-underline-offset:3px;}
  .proj-tags{display:flex;flex-wrap:wrap;gap:8px;}
  .tag{
    font-family:'IBM Plex Mono',monospace;
    font-size:0.72rem;
    color:var(--muted);
    border:1px solid var(--line);
    border-radius:3px;
    padding:3px 8px;
  }
  @media (max-width:900px){.proj-grid{grid-template-columns:1fr 1fr;}}
  @media (max-width:600px){.proj-grid{grid-template-columns:1fr;}}

  /* ---------- open source ---------- */
  .os-list{display:flex;flex-direction:column;}
  .os-item{
    display:grid;
    grid-template-columns:200px 1fr;
    gap:24px;
    padding:22px 0;
    border-bottom:1px solid var(--line);
  }
  .os-item:last-child{border-bottom:0;}
  .os-name{font-family:'IBM Plex Mono',monospace;font-size:0.95rem;color:var(--ink);}
  .os-name a{text-decoration:none;}
  .os-name a:hover, .os-name a:focus-visible{color:var(--accent);}
  .os-link{grid-column:2;display:inline-block;margin-top:8px;color:var(--accent);font-family:'IBM Plex Mono',monospace;font-size:0.76rem;text-decoration:none;}
  .os-link:hover, .os-link:focus-visible{text-decoration:underline;text-underline-offset:3px;}
  .os-item p{margin:0;color:var(--muted);max-width:60ch;}
  @media (max-width:640px){.os-item{grid-template-columns:1fr;gap:6px;}.os-link{grid-column:auto;}}

  /* ---------- skills ---------- */
  .skill-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:32px;
  }
  .skill-group h3{
    font-family:'IBM Plex Mono',monospace;
    font-weight:500;
    font-size:0.85rem;
    color:var(--muted);
    margin-bottom:14px;
  }
  .skill-group ul{list-style:none;margin:0;padding:0;}
  .skill-group li{
    padding:6px 0;
    border-bottom:1px solid var(--line);
    font-size:0.95rem;
  }
  .skill-group li:last-child{border-bottom:0;}
  @media (max-width:860px){.skill-grid{grid-template-columns:1fr 1fr;}}
  @media (max-width:480px){.skill-grid{grid-template-columns:1fr;}}

  /* ---------- testimonial ---------- */
  .quote{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:24px;
  }
  .quote-mark{
    font-family:'Fraunces',serif;
    font-size:4.5rem;
    line-height:1;
    color:var(--accent);
  }
  .quote blockquote{
    margin:0;
    font-family:'Fraunces',serif;
    font-weight:400;
    font-size:1.35rem;
    line-height:1.5;
    max-width:34ch;
  }
  .quote-attr{margin-top:20px;color:var(--muted);font-size:0.92rem;}
  .quote-attr strong{color:var(--ink);font-weight:500;}
  @media (max-width:600px){
    .quote{grid-template-columns:1fr;}
    .quote-mark{display:none;}
  }

  /* ---------- contact ---------- */
  .contact-inner{
    display:grid;
    grid-template-columns:1.2fr 0.8fr;
    gap:40px;
    align-items:end;
  }
  .contact h2{font-size:clamp(1.6rem,3vw,2.3rem);max-width:16ch;}
  .contact p{color:var(--muted);max-width:44ch;margin-top:18px;}
  .contact-box{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:6px;
    padding:26px;
  }
  .contact-box .term-k{display:block;font-size:0.78rem;margin-bottom:6px;}
  .contact-email{
    font-family:'IBM Plex Mono',monospace;
    font-size:1.05rem;
    text-decoration:none;
    border-bottom:1px solid var(--accent);
    padding-bottom:2px;
  }
  @media (max-width:760px){.contact-inner{grid-template-columns:1fr;align-items:start;}}

  /* ---------- services ---------- */
  .service-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;}
  .service{border-top:2px solid var(--accent);padding-top:16px;}
  .service h3{font-size:1.05rem;margin-bottom:8px;}
  .service p{color:var(--muted);font-size:0.92rem;margin:0;}
  @media (max-width:860px){.service-grid{grid-template-columns:1fr 1fr;}}
  @media (max-width:480px){.service-grid{grid-template-columns:1fr;}}

  /* ---------- footer ---------- */
  footer{border-top:1px solid var(--line);padding:36px 0;}
  .foot-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:12px;
  }
  .foot-row p{margin:0;color:var(--muted);font-size:0.86rem;}
  .foot-row a{text-decoration:none;color:var(--muted);font-size:0.86rem;}
  .foot-row a:hover{color:var(--ink);}
  .foot-links{display:flex;align-items:center;gap:20px;}
  @media (max-width:480px){.foot-links{width:100%;justify-content:space-between;}}
