:root {
  --bg: #051b21;
  --surface: #0a252c; 
  --surface-2: #171C27;
  --border: #163640; 
  --text: #ffffff;
  --text-muted: #b0b0b0;
  --nav-links: #171C27;
  --accent: #a0f14a;
  --accent-soft: #a0f14a1a; 
  --card-link: #a0f14a; 
  --mint: #7EE8B0;
  --max: 1120px;
  --sidebar-w: 260px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

  *{box-sizing:border-box;margin:0;padding:0;}
  html{scroll-behavior:smooth;}
  body{
    background:var(--bg);
    color:var(--text);
    font-family:var(--font-body);
    line-height:1.55;
    -webkit-font-smoothing:antialiased;
    background-image:
      radial-gradient(circle at 1px 1px, #ffffff0a 1px, transparent 0);
    background-size:28px 28px;
  }
  img{max-width:100%;display:block;}
  a{color:inherit;text-decoration:none;}
  ul{list-style:none;}
  section{padding:96px 24px;}
  .wrap{max-width:var(--max);margin:0 auto;}
  .eyebrow{
    font-family:var(--font-mono);
    color:var(--accent);
    font-size:0.85rem;
    letter-spacing:0.02em;
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-bottom:14px;
  }
  h1,h2,h3{font-family:var(--font-display);font-weight:700;letter-spacing:-0.01em;}
  h2{font-size:clamp(1.8rem,3.4vw,2.6rem);color:var(--text);}
  .section-head{max-width:640px;margin-bottom:52px;}
  .section-head p{color:var(--text-muted);margin-top:14px;font-size:1.02rem;}
  :focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px;}

  @media (prefers-reduced-motion: reduce){
    *{animation:none !important;transition:none !important;scroll-behavior:auto !important;}
  }

  /* ---------- sidebar ---------- */
  .logo{font-family:var(--font-display);font-weight:700;font-size:1.15rem;color:var(--nav-links);}

  .sidebar{
    background:var(--text);
    border-right:1px solid var(--border);
    display:flex;
    flex-direction:column;
  }

  .sidebar-header{
    padding:26px 24px 18px;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
  }

  .menu-toggle, .menu-close{
    display:none;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
    border:none;
    background:none;
    color:var(--text);
    cursor:pointer;
    padding:0;
    flex-shrink:0;
  }
  .menu-toggle svg, .menu-close svg{width:22px;height:22px;}

  .sidebar-menu{
    display:flex;
    flex-direction:column;
    flex:1 1 auto;
    min-height:0;
  }

  .sidebar-nav{
    flex:1 1 auto;
    overflow-y:auto;
    padding:10px 14px;
    display:flex;
    flex-direction:column;
    gap:2px;
  }
  .sidebar-nav a{
    padding:10px 12px;
    border-radius:8px;
    font-size:0.94rem;
    color:var(--nav-links);
  }
  .sidebar-nav a:hover{color:var(--text);background:var(--surface-2);}
  .sidebar-nav a.is-active{
    color:var(--accent);
    background:var(--surface-2);
    border-left-color:var(--accent);
  }
  .sidebar-footer{
    flex-shrink:0;
    padding:18px 24px 24px;
    border-top:1px solid var(--border);
  }
  .theme-switch{
    display:flex;
    align-items:center;
    gap:2px;
    padding:2px;
    border:1px solid var(--border);
    border-radius:100px;
    background:var(--surface-2);
  }
  .theme-opt{
    display:flex;
    align-items:center;
    justify-content:center;
    width:24px;
    height:24px;
    border-radius:50%;
    border:none;
    background:none;
    color:var(--text-muted);
    cursor:pointer;
    transition:background .15s ease, color .15s ease;
  }
  .theme-opt svg{width:14px;height:14px;}
  .theme-opt:hover{color:var(--text);}
  .theme-opt.is-active{background:var(--accent);color:#151107;}

  /* Tablet and Phone */
  @media (max-width:1023px){
    .sidebar{
      border-bottom:1px solid var(--border);
      position:fixed;
      top:0;
      left:0;
      right:0;
      z-index:40;
    }

    .sidebar-header{
      height:72px;
      box-sizing:border-box;
    }
    
    .main-content{margin-top:72px;}

    .menu-toggle{display:flex;color:var(--bg);}

    .sidebar-menu{
      display:none;
      position:fixed;
      inset:0;
      z-index:50;
      background:var(--bg);
      padding:24px;
      overflow-y:auto;
    }
    .sidebar-menu.is-open{display:flex;}

    .menu-close{display:flex;align-self:flex-end;margin-bottom:20px;}

    .sidebar-nav{
      flex:none;
      overflow:visible;
      padding:0;
      gap:4px;
    }
    .sidebar-nav a{
      font-family:var(--font-display);
      font-weight:700;
      font-size:1.7rem;
      padding:14px 4px;
        color: var(--text);
    }

        .sidebar-footer{
      margin-top:24px;
      padding:24px 4px 0;
      border-top:1px solid var(--border);
    }
    
    .sidebar-footer p{
      color:var(--text-muted);
    }
    .sidebar-footer a{
      color:var(--text);
    }
    .sidebar-footer a:hover{
      color:var(--accent);
    }

    body.menu-open{overflow:hidden;}
  }

  /* Laptop and up: sidebar is a persistent fixed column, no hamburger. */
  @media (min-width:1024px){
    .sidebar{
      position:fixed;
      top:0;
      left:0;
      width:var(--sidebar-w);
      height:100vh;
      z-index:40;
    }
    .main-content{margin-left:var(--sidebar-w);}
  }

  /* ---------- hero ---------- */
  .hero{padding:72px 24px 96px;}
  .hero-grid{
    max-width:var(--max);margin:0 auto;
    display:grid;gap:56px;
    grid-template-columns:1fr;
    align-items:center;
  }
  .hero h1{font-size:clamp(2.4rem,6vw,3.6rem);line-height:2.08;color:var(--accent);}
  .role{font-family:var(--font-mono);color:var(--text-muted);font-size:1.05rem;margin:14px 0 20px;}
  .role .cursor{display:inline-block;width:9px;height:1.1em;background:var(--accent);margin-left:2px;vertical-align:-2px;animation:blink 1.1s steps(2) infinite;}
  @keyframes blink{50%{opacity:0;}}
  .bio{color:var(--text-muted);max-width:52ch;font-size:1.02rem;margin-bottom:32px;}
  .cta-row{display:flex;flex-wrap:wrap;gap:14px;}
  .btn{
    font-family:var(--font-body);font-weight:600;font-size:0.95rem;
    padding:13px 24px;border-radius:8px;border:1px solid transparent;
    display:inline-flex;align-items:center;gap:8px;cursor:pointer;
    transition:transform .15s ease, background .15s ease, border-color .15s ease;
  }
  .btn:hover{transform:translateY(-2px);}
  .btn-primary{background:var(--accent);color:#151107;}
  .btn-primary:hover{background:#ffc247;}
  .btn-ghost{border-color:var(--border);color:var(--text);}
  .btn-ghost:hover{border-color:var(--accent);color:var(--accent);}

  @media (max-width:480px){
    .cta-row{flex-direction:column;}
    .cta-row .btn{width:100%;justify-content:center;}
  }

  .hero-photo{
    justify-self:center;
    display:flex;flex-direction:column;align-items:center;gap:22px;
  }
  .frame{
    width:220px;height:220px;border-radius:20px;
    background:linear-gradient(155deg, var(--surface-2), var(--surface));
    border:1px solid var(--border);
    display:flex;align-items:center;justify-content:center;
    position:relative;overflow:hidden;
  }
  .frame::before{
    content:"";position:absolute;inset:0;
    background:radial-gradient(circle at 30% 20%, #ffb02022, transparent 60%);
  }
  .frame .initials{
    font-family:var(--font-display);font-size:3.2rem;font-weight:700;color:var(--accent);
    z-index:1;
  }
  /* Replace .frame contents with an <img> of your actual photo when ready */
  .stack-label{font-family:var(--font-mono);font-size:0.75rem;color:var(--text-muted);text-align:center;}
  .stack-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;max-width:260px;}
  .chip{
    font-family:var(--font-mono);font-size:0.76rem;color:var(--text);
    background:var(--surface);border:1px solid var(--border);
    padding:6px 11px;border-radius:100px;
  }

  @media (min-width:900px){
    .hero-grid{grid-template-columns:1.2fr 0.8fr;}
    .hero-photo{justify-self:end;}
  }

  /* ---------- work ---------- */
  .work-grid{display:grid;gap:28px;grid-template-columns:1fr;}
  @media (min-width:720px){.work-grid{grid-template-columns:repeat(2,1fr);}}
  @media (min-width:1040px){.work-grid{grid-template-columns:repeat(3,1fr);}}

  .card{
    background:var(--surface);border:1px solid var(--border);border-radius:14px;
    overflow:hidden;display:flex;flex-direction:column;
    transition:transform .2s ease, border-color .2s ease;
  }
  .card:hover{transform:translateY(-4px);border-color:#333c50;}
  .card-art{
    height:150px;position:relative;
    display:flex;align-items:center;justify-content:center;
    font-family:var(--font-mono);font-size:0.78rem;color:#00000088;
  }
  .card-art span{font-family:var(--font-display);font-weight:700;font-size:1.6rem;color:#ffffffcc;z-index:1;}
  .art-1{background: url("assets/featured/skinrockwest-cover.jpg"); background-size: cover;}
  .art-2{background: url("assets/featured/digassist-cover.jpg"); background-size: cover;}
  .art-3{background: url("assets/featured/petcheckr.jpg"); background-size: cover;}
  .art-4{background: url("assets/featured/getko-cover.jpg"); background-size: cover;}
  .art-5{background: url("assets/featured/exoacademy-cover.jpg"); background-size: cover;}
  .card-body{padding:22px 22px 24px;display:flex;flex-direction:column;flex:1;}
  .card-body h3{font-size:1.15rem;margin-bottom:8px;}
  .card-body p{color:var(--text-muted);font-size:0.92rem;margin-bottom:16px;flex:1;}
  .tag-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px;}
  .tag{
    font-family:var(--font-mono);font-size:0.7rem;color:var(--text-muted);
    border:1px solid var(--border);padding:4px 9px;border-radius:100px;
  }
  .card-link{
    font-family:var(--font-mono);font-size:0.85rem;color:var(--card-link);
    display:inline-flex;align-items:center;gap:6px;
  }
  .card-link:hover{text-decoration:underline;}

  .view-all-row{margin-top:28px;}
  .view-all{
    font-family:var(--font-mono);font-size:0.92rem;color:var(--card-link);
    display:inline-flex;align-items:center;gap:6px;
  }
  .view-all:hover{text-decoration:underline;}

  /* ---------- case studies ---------- */
  .cs-list{display:flex;flex-direction:column;gap:20px;}

  .cs-card{
    background:var(--surface);border:1px solid var(--border);border-radius:16px;
    padding:28px;
  }

  .cs-card-top{
    display:flex;align-items:flex-start;flex-wrap:wrap;gap:14px;
    margin-bottom:14px;
  }

  .cs-icon{
    flex-shrink:0;width:44px;height:44px;border-radius:10px;
    background:var(--surface-2);border:1px solid var(--border);
    display:flex;align-items:center;justify-content:center;
    color:var(--accent);
  }
  .cs-icon svg{width:22px;height:22px;}

  .cs-title{flex:1 1 220px;min-width:0;font-size:1.15rem;}

  .cs-badge{
    flex-shrink:0;margin-left:auto;
    font-family:var(--font-mono);font-size:0.72rem;
    color:var(--accent);background:var(--accent-soft);
    padding:6px 12px;border-radius:100px;white-space:nowrap;
  }

  .cs-card .tag-row{margin-bottom:16px;}

  .cs-result{color:var(--text);font-size:0.95rem;font-weight:600;margin-bottom:20px;}

  .cs-divider{border:none;border-top:1px solid var(--border);margin:0 0 20px;}

  .cs-block{display:flex;gap:14px;margin-bottom:18px;}
  .cs-block:last-child{margin-bottom:0;}
  .cs-block > div{min-width:0;}

  .cs-block-icon{
    flex-shrink:0;width:30px;height:30px;border-radius:50%;
    background:var(--accent-soft);color:var(--accent);
    display:flex;align-items:center;justify-content:center;
  }
  .cs-block-icon svg{width:15px;height:15px;}

  .cs-block h4{
    font-family:var(--font-mono);font-size:0.78rem;font-weight:400;
    color:var(--accent);margin-bottom:6px;
  }
  .cs-block p{color:var(--text-muted);font-size:0.92rem;}

  @media (max-width:480px){
    .cs-card{padding:20px;}
    .cs-badge{margin-left:0;}
  }

  /* ---------- experience ---------- */
  .timeline{position:relative;max-width:760px;}
  .timeline::before{
    content:"";position:absolute;left:9px;top:8px;bottom:8px;width:1px;background:var(--border);
  }
  .tl-item{position:relative;padding-left:38px;margin-bottom:44px;}
  .tl-item:last-child{margin-bottom:0;}
  .tl-dot{
    position:absolute;left:0;top:4px;width:19px;height:19px;border-radius:50%;
    background:var(--surface);border:2px solid var(--accent);
  }
  .tl-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:4px;}
  .tl-head h3{font-size:1.1rem;}
  .tl-date{font-family:var(--font-mono);font-size:0.78rem;color:var(--accent);}
  .tl-meta{color:var(--text-muted);font-size:0.85rem;margin-bottom:10px;}
  .tl-desc{color:var(--text-muted);font-size:0.93rem;margin-bottom:14px;}
  .tl-desc li{position:relative;padding-left:16px;margin-bottom:6px;}
  .tl-desc li::before{content:"—";position:absolute;left:0;color:var(--text-muted);}

  /* ---------- skills ---------- */
  .skill-group{margin-bottom:28px;}
  .skill-group:last-child{margin-bottom:0;}
  .skill-group h4{font-family:var(--font-mono);font-size:0.8rem;color:var(--text-muted);margin-bottom:12px;font-weight:400;}
  .skill-tags{display:flex;flex-wrap:wrap;gap:10px;}
  .skill-tags span{
    font-size:0.92rem;color:var(--text);background:var(--surface);
    border:1px solid var(--border);padding:8px 16px;border-radius:9px;
  }

  .reveal{opacity:0;transform:translateY(16px);transition:opacity .6s ease, transform .6s ease;}
  .reveal.in{opacity:1;transform:translateY(0);}
