:root{
    --paper: #F1F4FB;         /* blueish off-white */
    --paper-raised: #FFFFFF;
    --ink: #11142A;           /* deep navy ink */
    --ink-dim: #5B6478;
    --ink-faint: #98A0B4;
    --line: #DEE4F2;
    --accent: #2F6FEB;        /* vivid blue — primary signature accent */
    --accent-soft: #DCE8FF;   /* pale blue — for text highlights */
    --accent2: #6F5CF0;       /* indigo-violet — secondary accent */
    --radius: 18px;
  }
  *{ box-sizing:border-box; margin:0; padding:0; }
  html{ scroll-behavior:smooth; }
  @media (prefers-reduced-motion: reduce){
    html{ scroll-behavior:auto; }
    *{ animation-duration:.01ms !important; transition-duration:.01ms !important; }
  }
  body{
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  a{ color:inherit; text-decoration:none; }
  .display{ font-family:'Bricolage Grotesque', sans-serif; font-weight:700; letter-spacing:-0.02em; }
  .mono{ font-family:'IBM Plex Mono', monospace; }
  .wrap{ max-width: 1120px; margin:0 auto; padding: 0 32px; }

  /* clean off-white background — no texture overlay, for a lighter feel and better scroll performance */

  /* ---------- custom cursor ----------
     Ring + dot + label all live inside one parent that JS moves as a
     single unit (translate3d only — GPU, no layout cost), so nothing can
     drift out of sync. Solid colors instead of mix-blend-mode, so it's
     always visible no matter what's behind it — including under the
     header's backdrop-filter, which breaks blend modes. */
  @media (pointer: fine){
    body{ cursor: none; }
    a, button, .marq-chip, .magnetic{ cursor: none; }
  }
  #cursor{
    position: fixed; top:0; left:0; z-index: 9999; pointer-events:none;
    will-change: transform;
  }
  .cursor-light{
    position:absolute; top:0; left:0; width: 280px; height:280px; margin:-140px 0 0 -140px;
    border-radius:50%;
    background: radial-gradient(circle, rgba(255,214,231,0.32) 0%, rgba(255,214,231,0.13) 42%, rgba(255,214,231,0) 72%);
    mix-blend-mode: multiply;
  }
  .cursor-ring{
    position:absolute; top:0; left:0; width:34px; height:34px; margin:-17px 0 0 -17px;
    border: 1.5px solid var(--ink); border-radius:50%; background: transparent;
    transition: transform .3s cubic-bezier(.2,.8,.2,1), background .25s ease, border-color .25s ease;
  }
  .cursor-dot{
    position:absolute; top:0; left:0; width:7px; height:7px; margin:-3.5px 0 0 -3.5px;
    background: var(--accent); border-radius:50%;
    transition: transform .2s ease, opacity .2s ease;
  }
  .cursor-text{
    position:absolute; top:0; left:0; width:110px; margin:24px 0 0 -55px;
    text-align:center; font-family:'IBM Plex Mono', monospace; font-size:10.5px; font-weight:600;
    letter-spacing:.05em; text-transform:uppercase; color: var(--ink);
    opacity:0; transition: opacity .2s ease;
  }
  /* hover: ring grows and fills, dot tucks away, label appears.
     Kept modest and translucent so it never obscures button text. */
  #cursor.hover .cursor-ring{ transform: scale(1.5); background: rgba(220,232,255,0.4); border-color: var(--accent); }
  #cursor.hover .cursor-dot{ transform: scale(0); opacity:0; }
  #cursor.hover .cursor-text{ opacity:1; }
  /* click: quick squish for tactile feedback */
  #cursor.active .cursor-ring{ transform: scale(1.2); }
  #cursor.hover.active .cursor-ring{ transform: scale(1.3); }
  @media (pointer: coarse){
    #cursor{ display:none; }
  }

  .magnetic{ display:inline-flex; transition: transform .25s cubic-bezier(.2,.8,.2,1); }

  /* ---------- nav ---------- */
  header{
    position: sticky; top:0; z-index: 50;
    background: rgba(241,244,251,0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .navbar{ display:flex; align-items:center; justify-content:space-between; padding:20px 32px; max-width:1120px; margin:0 auto; }
  .brand{ font-family:'Bricolage Grotesque', sans-serif; font-weight:700; font-size:19px; display:flex; align-items:center; gap:9px; }
  .brand .sq{ width:11px; height:11px; background: var(--accent); border:1.5px solid var(--ink); border-radius:3px; transform: rotate(8deg); }
  .navlinks{ display:flex; gap:34px; list-style:none; font-size:14px; }
  .navlinks a{ position:relative; color: var(--ink-dim); transition: color .15s ease; }
  .navlinks a::after{ content:''; position:absolute; left:0; right:0; bottom:-5px; height:2px; background:var(--accent2); transform:scaleX(0); transform-origin:left; transition: transform .25s ease; }
  .navlinks a:hover{ color: var(--ink); }
  .navlinks a:hover::after{ transform:scaleX(1); }
  .nav-cta{
    font-family:'IBM Plex Mono', monospace; font-size:12.5px; font-weight:600; padding:10px 18px;
    border: 1.5px solid var(--ink); border-radius:999px; letter-spacing:.02em;
    transition: background .18s ease, color .18s ease, transform .18s ease;
  }
  .nav-cta:hover{ background: var(--ink); color: var(--paper); }
  @media (max-width:760px){ .navlinks{ display:none; } }

  main{ position:relative; z-index:1; }
  section{ padding: 110px 0; }

  /* Content is visible by default. JS opts elements INTO the hidden
     start-state via .reveal-init, so if script.js fails to load for any
     reason, the page still displays fully instead of staying blank. */
  .reveal-init{ opacity:0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
  .reveal-init.in{ opacity:1; transform:none; }

  /* ---------- hero / about ---------- */
  .hero{ padding-top: 76px; padding-bottom: 60px; }
  .eyebrow{
    font-family:'IBM Plex Mono', monospace; font-size:12.5px; color: var(--accent2);
    letter-spacing:.1em; text-transform:uppercase; margin-bottom:22px; display:flex; align-items:center; gap:10px;
  }
  .eyebrow .dash{ width:22px; height:1.5px; background: var(--accent2); }

  .hero-grid{ display:grid; grid-template-columns: 1.5fr 1fr; gap:56px; align-items:start; }
  @media (max-width:900px){ .hero-grid{ grid-template-columns:1fr; } }

  .hero h1{ font-size: clamp(44px, 7vw, 84px); line-height:0.98; margin-bottom:22px; }
  .hero h1 .hl{
    background: var(--accent-soft); padding: 0 10px 4px; border-radius: 6px 14px 6px 14px;
    display:inline-block; color: var(--ink);
  }
  .name-lift .letter{
    display:inline-block;
    transition: transform .22s cubic-bezier(.34,1.56,.64,1), color .2s ease;
  }
  .name-lift .letter:hover{
    transform: translateY(-12px) rotate(-4deg);
    color: var(--accent);
  }
  .hero .role{ font-size:19px; color: var(--ink-dim); margin-bottom:28px; max-width:520px; }
  .hero .role strong{ color: var(--ink); font-weight:600; }

  .about-text{ color: var(--ink-dim); font-size:16px; max-width: 520px; margin-bottom: 34px; }
  .about-text + .about-text{ margin-top:-20px; }

  .cta-row{ display:flex; gap:14px; flex-wrap:wrap; }
  .btn{
    font-family:'IBM Plex Mono', monospace; font-size:13.5px; font-weight:600; padding:14px 26px;
    border-radius:999px; display:inline-flex; align-items:center; gap:9px; transition: transform .18s ease, background .18s ease, color .18s ease;
  }
  .btn.primary{ background: var(--ink); color: var(--paper); }
  .btn.primary:hover{ background: var(--accent2); }
  .btn.ghost{ border:1.5px solid var(--ink); color: var(--ink); }
  .btn.ghost:hover{ background: var(--ink); color: var(--paper); }

  .id-card{
    background: var(--paper-raised); border: 1.5px solid var(--ink); border-radius: var(--radius);
    padding: 28px; position: relative; box-shadow: 7px 7px 0 var(--accent2);
  }
  .id-card .tag{ font-family:'IBM Plex Mono', monospace; font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color: var(--ink-faint); margin-bottom:16px; }
  .id-row{ display:flex; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--line); font-size:14px; }
  .id-row:last-child{ border-bottom:none; }
  .id-row .k{ color: var(--ink-dim); }
  .id-row .v{ font-weight:600; text-align:right; }
  .status-dot{ display:inline-block; width:7px; height:7px; border-radius:50%; background:#4CAF50; margin-right:7px; }

  /* ---------- skills / marquee ---------- */
  .skills-section{ border-top:1px solid var(--line); border-bottom:1px solid var(--line); background: var(--paper-raised); }
  .skills-head{ margin-bottom:52px; }
  .skills-head h2{ font-size: clamp(32px,4.5vw,48px); margin-bottom:14px; }
  .skills-head p{ color: var(--ink-dim); max-width:520px; font-size:15.5px; }

  .marquee-row{ position:relative; overflow:hidden; margin-bottom: 22px; -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent); }
  .marquee-track{ display:flex; gap:16px; width:max-content; animation: scrollL 34s linear infinite; }
  .marquee-track.rev{ animation: scrollR 30s linear infinite; }
  .marquee-row:hover .marquee-track{ animation-play-state: paused; }
  @keyframes scrollL{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }
  @keyframes scrollR{ from{ transform:translateX(-50%); } to{ transform:translateX(0); } }

  /* cute pastel skill chips — soft square boxes, not pills. Each chip
     gets its pastel fill + matching shadow tone from an inline CSS
     variable set in JS, so colors cycle without extra classes. */
  .marq-chip{
    font-family:'IBM Plex Mono', monospace; font-size:15px; font-weight:600;
    padding: 14px 24px; border-radius:12px; border:1.5px solid var(--ink); white-space:nowrap;
    display:flex; align-items:center; gap:10px;
    background: var(--pastel-bg, var(--paper-raised));
    box-shadow: 3px 3px 0 var(--pastel-shadow, var(--ink));
    color: var(--ink);
    transition: transform .22s cubic-bezier(.3,1.4,.5,1), box-shadow .22s cubic-bezier(.3,1.4,.5,1);
  }
  .marq-chip .pct{ font-size:11px; color: var(--ink-dim); }
  .marq-chip:hover{ transform: translateY(-5px) rotate(-2deg); box-shadow: 5px 6px 0 var(--pastel-shadow, var(--ink)); }

  /* ---------- projects ---------- */
  .projects-section{ padding-top: 110px; }
  .project-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 8px; }
  @media (max-width: 900px){ .project-grid{ grid-template-columns: 1fr; max-width:460px; margin-left:auto; margin-right:auto; } }

  .project-card{
    background: var(--paper-raised); border: 1.5px solid var(--ink); border-radius: var(--radius);
    overflow: hidden; box-shadow: 6px 6px 0 var(--shadow, var(--accent2));
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .project-card:hover{ transform: translate(-3px,-3px); box-shadow: 9px 9px 0 var(--shadow, var(--accent2)); }

  .project-thumb{
    height: 140px; display:flex; align-items:center; justify-content:center;
    border-bottom: 1.5px solid var(--ink);
  }
  .project-mark{
    font-family:'Bricolage Grotesque', sans-serif; font-weight:800; font-size: 30px; color: #fff;
    letter-spacing: -0.02em;
  }

  .project-body{ padding: 22px; }
  .project-top{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:10px; gap:10px; }
  .project-top h3{ font-size: 19px; }
  .project-year{ font-size: 11.5px; color: var(--ink-faint); white-space:nowrap; }
  .project-desc{ color: var(--ink-dim); font-size: 14px; margin-bottom: 16px; min-height: 62px; }
  .project-tags{ display:flex; flex-wrap:wrap; gap:7px; margin-bottom: 16px; }
  .ptag{ font-family:'IBM Plex Mono', monospace; font-size: 11px; padding: 5px 10px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-dim); }
  .project-links{ display:flex; gap:16px; font-family:'IBM Plex Mono', monospace; font-size: 12.5px; }
  .project-links a{ border-bottom: 1px solid transparent; transition: border-color .15s ease, color .15s ease; }
  .project-links a:hover{ border-color: currentColor; color: var(--accent2); }

  /* ---------- contact ---------- */
  .contact-section{ text-align:center; padding-top:120px; padding-bottom:100px; }
  .contact-section .eyebrow{ justify-content:center; }
  .contact-section h2{ font-size: clamp(34px,6vw,64px); margin: 0 auto 26px; max-width:760px; line-height:1.05; }
  .contact-section p.sub{ color: var(--ink-dim); font-size:16px; margin-bottom:44px; }

  .email-cta{
    display:inline-flex; align-items:center; gap:14px;
    font-family:'Bricolage Grotesque', sans-serif; font-weight:700;
    font-size: clamp(20px, 3.4vw, 32px);
    padding: 22px 40px; border-radius:999px; border: 2px solid var(--ink);
    background: var(--paper-raised);
    transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  }
  .email-cta:hover{ background: var(--accent); color: #fff; box-shadow: 8px 8px 0 var(--ink); transform: translate(-4px,-4px); }
  .email-cta .arrow{ font-size:22px; transition: transform .2s ease; }
  .email-cta:hover .arrow{ transform: translate(4px,-4px) rotate(10deg); }

  .social-row{ display:flex; gap:16px; justify-content:center; margin-top:40px; }
  .social-chip{
    font-family:'IBM Plex Mono', monospace; font-size:13px; font-weight:600; padding:11px 20px;
    border-radius:999px; border:1.5px solid var(--line); color: var(--ink-dim);
    transition: border-color .18s ease, color .18s ease, transform .18s ease;
  }
  .social-chip:hover{ border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }

  footer{ border-top:1px solid var(--line); padding: 30px 0; text-align:center; color:var(--ink-faint); font-family:'IBM Plex Mono', monospace; font-size:12px; }

  .note{
    font-family:'IBM Plex Mono', monospace; font-size:11.5px; color: var(--ink-dim);
    background: var(--paper-raised); border: 1px dashed var(--line); padding: 10px 16px; border-radius: 8px;
  }