
  :root{
    --ink:#101F3C;
    --paper:#F3F6F0;
    --paper-2:#EAEFE6;
    --emerald:#1B7A5B;
    --emerald-deep:#125743;
    --amber:#E8A93B;
    --slate:#5B6470;
    --line:#D9E0D6;
    --white:#FFFEFB;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html{scroll-behavior:smooth;}
  body{
    background:var(--paper);
    color:var(--ink);
    font-family:'IBM Plex Sans', sans-serif;
    font-size:16px;
    line-height:1.6;
    overflow-x:hidden;
  }
  @media (prefers-reduced-motion: reduce){
    *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; scroll-behavior:auto !important;}
  }

  a{color:inherit;}
  h1,h2,h3{font-family:'Fraunces', serif; letter-spacing:-0.01em;}
  .mono{font-family:'IBM Plex Mono', monospace;}

  /* ---------- LAYOUT ---------- */
  .wrap{max-width:1080px; margin:0 auto; padding:0 32px;}
  section{padding:96px 0;}
  @media(max-width:640px){ section{padding:64px 0;} .wrap{padding:0 22px;} }
  @media(max-width:380px){ .wrap{padding:0 18px;} }

  /* ---------- NAV ---------- */
  #nav{position:fixed; top:0; left:0; right:0; z-index:70; padding:22px 0; transition:background .35s ease, padding .35s ease, box-shadow .35s ease;}
  #nav.scrolled{background:rgba(243,246,240,.82); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); padding:13px 0; box-shadow:0 1px 0 var(--line);}
  .nav-inner{display:flex; align-items:center; justify-content:space-between;}
  .nav-logo{font-family:'Fraunces', serif; font-weight:600; font-size:21px; text-decoration:none; color:var(--ink); letter-spacing:-.01em;}
  .nav-logo span{color:var(--emerald);}
  .nav-links{display:none; align-items:center; gap:30px; font-family:'IBM Plex Mono', monospace; font-size:12.5px;}
  @media(min-width:880px){ .nav-links{display:flex;} }
  .nav-links a{text-decoration:none; color:var(--ink); position:relative; padding:5px 0;}
  .nav-links a::after{content:''; position:absolute; left:0; bottom:0; width:0; height:2px; background:var(--emerald); transition:width .25s ease;}
  .nav-links a:hover::after, .nav-links a.active::after{width:100%;}
  .nav-links a.active{color:var(--emerald-deep);}
  .nav-cta{background:var(--ink); color:var(--white) !important; padding:9px 17px; border-radius:20px;}
  .nav-cta::after{display:none !important;}
  .nav-cta:hover{background:var(--emerald-deep);}
  #nav-toggle{display:flex; flex-direction:column; justify-content:center; gap:5px; width:38px; height:38px; background:none; border:none; cursor:pointer; z-index:80; position:relative;}
  @media(min-width:880px){ #nav-toggle{display:none;} }
  #nav-toggle span{width:22px; height:2px; background:var(--ink); transition:transform .3s ease, opacity .3s ease; display:block;}
  #nav-toggle.open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
  #nav-toggle.open span:nth-child(2){opacity:0;}
  #nav-toggle.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

  #mobile-menu{
    position:fixed; inset:0; background:var(--ink); z-index:65;
    display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:22px;
    padding:0 40px; transform:translateY(-102%); transition:transform .45s cubic-bezier(.65,0,.35,1);
  }
  #mobile-menu.open{transform:translateY(0);}
  #mobile-menu a{color:var(--white); font-family:'Fraunces', serif; font-weight:500; font-size:clamp(28px,7vw,38px); text-decoration:none; opacity:.9;}
  #mobile-menu a:hover{opacity:1; color:var(--amber);}
  #mobile-menu .mm-cv{margin-top:12px; font-family:'IBM Plex Mono', monospace; font-size:14px; color:var(--amber); opacity:1;}

  /* ---------- SCROLL REVEAL ---------- */
  .reveal{opacity:0; transform:translateY(28px); transition:opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);}
  .reveal.in-view{opacity:1; transform:translateY(0);}
  .skill-grid .skill-card:nth-child(2){transition-delay:.1s;}
  .int-grid .int-card:nth-child(2){transition-delay:.1s;}
  .int-grid .int-card:nth-child(3){transition-delay:.2s;}
  .xp-item:nth-child(2){transition-delay:.08s;}
  .edu-item:nth-child(2){transition-delay:.1s;}
  .edu-item:nth-child(3){transition-delay:.2s;}

  /* ---------- BACK TO TOP ---------- */
  #totop{
    position:fixed; right:22px; bottom:60px; z-index:55; width:44px; height:44px; border-radius:50%;
    background:var(--ink); color:var(--white); border:none; display:flex; align-items:center; justify-content:center;
    cursor:pointer; opacity:0; transform:translateY(10px) scale(.9); pointer-events:none;
    transition:opacity .3s ease, transform .3s ease, background .25s ease;
  }
  #totop.show{opacity:1; transform:translateY(0) scale(1); pointer-events:auto;}
  #totop:hover{background:var(--emerald-deep);}
  @media(max-width:640px){ #totop{bottom:54px; right:16px; width:40px; height:40px;} }

  .eyebrow{
    font-family:'IBM Plex Mono', monospace; font-size:12.5px; letter-spacing:.18em;
    text-transform:uppercase; color:var(--emerald-deep); display:flex; align-items:center; gap:10px;
    margin-bottom:14px;
  }
  .eyebrow::before{content:''; width:22px; height:1px; background:var(--emerald);}

  /* ---------- HERO ---------- */
  header#hero{
    padding-top:150px; padding-bottom:70px; position:relative;
  }
  #hero .wrap{display:grid; grid-template-columns:1.2fr 0.8fr; gap:56px; align-items:center; perspective:1000px;}
  @media(max-width:800px){ #hero .wrap{grid-template-columns:1fr; text-align:left;} #hero{padding-top:120px;} }

  .name-block h1{
    font-size:clamp(48px, 8vw, 84px); font-weight:600; line-height:0.98; color:var(--ink);
  }
  .name-block h1 span{display:block; color:var(--emerald); font-style:italic; font-weight:500;}
  .role-tag{
    margin-top:22px; font-size:18px; color:var(--slate); max-width:440px;
  }
  .chips{display:flex; flex-wrap:wrap; gap:10px; margin-top:30px;}
  .chip{
    display:flex; align-items:center; gap:8px; font-family:'IBM Plex Mono', monospace; font-size:12.5px;
    background:var(--white); border:1px solid var(--line); padding:8px 13px; border-radius:30px; color:var(--ink);
    text-decoration:none;
  }
  .chip svg{width:13px; height:13px; flex-shrink:0;}
  .chip{transition:border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;}
  .chip:hover{border-color:var(--emerald); color:var(--emerald-deep); transform:translateY(-2px); box-shadow:0 6px 16px rgba(16,31,60,.08);}

  .portrait-frame{
    position:relative; justify-self:center; will-change:transform;
  }
  .portrait-frame{transition:transform .25s ease;}
  .portrait-frame .plate{
    position:absolute; inset:14px -14px -14px 14px; background:var(--amber); border-radius:6px; z-index:0;
  }
  .portrait-frame img{
    position:relative; z-index:1; width:270px; max-width:100%; height:auto; display:block; border-radius:6px;
    border:5px solid var(--white); box-shadow:0 18px 40px rgba(16,31,60,.18);
    filter:grayscale(.08);
  }

  /* ---------- ABOUT ---------- */
  #about .wrap{display:grid; grid-template-columns:1fr 1.4fr; gap:50px;}
  @media(max-width:800px){ #about .wrap{grid-template-columns:1fr;} }
  #about blockquote{
    font-family:'Fraunces', serif; font-style:italic; font-weight:500; font-size:clamp(21px,2.6vw,27px);
    line-height:1.45; color:var(--ink); border-left:3px solid var(--emerald); padding-left:26px;
  }
  .lang-panel{background:var(--white); border:1px solid var(--line); border-radius:10px; padding:26px; transition:transform .3s ease, box-shadow .3s ease;}
  .lang-panel:hover{transform:translateY(-4px); box-shadow:0 16px 32px rgba(16,31,60,.08);}
  .lang-panel h3{font-size:15px; font-family:'IBM Plex Mono', monospace; text-transform:uppercase; letter-spacing:.1em; margin-bottom:16px; color:var(--slate);}
  .lang-row{display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--line); font-size:14.5px;}
  .lang-row:last-child{border-bottom:none;}
  .lang-level{font-family:'IBM Plex Mono', monospace; font-size:12px; background:var(--paper-2); padding:3px 9px; border-radius:20px; color:var(--emerald-deep); font-weight:600;}

  /* ---------- SKILLS ---------- */
  .skill-grid{display:grid; grid-template-columns:1fr 1fr; gap:28px; margin-top:36px;}
  @media(max-width:700px){ .skill-grid{grid-template-columns:1fr;} }
  .skill-card{background:var(--white); border:1px solid var(--line); border-radius:10px; padding:30px; transition:transform .3s ease, box-shadow .3s ease;}
  .skill-card:hover{transform:translateY(-4px); box-shadow:0 16px 32px rgba(16,31,60,.08);}
  .skill-card h3{font-size:14px; font-family:'IBM Plex Mono', monospace; text-transform:uppercase; letter-spacing:.1em; color:var(--slate); margin-bottom:18px;}
  .tag-list{display:flex; flex-wrap:wrap; gap:9px;}
  .tag-list span{
    font-size:13.5px; padding:8px 13px; border-radius:20px; background:var(--paper-2); color:var(--ink);
    border:1px solid transparent; transition:background .2s ease, transform .2s ease;
  }
  .tag-list span:hover{transform:translateY(-2px); background:#DEE8DA;}
  .skill-card.soft .tag-list span{background:transparent; border-color:var(--emerald); color:var(--emerald-deep);}

  /* ---------- EXPERIENCE ---------- */
  .xp-item{display:grid; grid-template-columns:150px 1fr; gap:30px; padding:28px 0; border-top:1px solid var(--line); transition:padding-left .3s ease, background .3s ease;}
  .xp-item:hover{padding-left:12px; background:rgba(27,122,91,.04);}
  .xp-item:last-child{border-bottom:1px solid var(--line);}
  @media(max-width:700px){ .xp-item{grid-template-columns:1fr; gap:8px;} }
  .xp-date{font-family:'IBM Plex Mono', monospace; font-size:13px; color:var(--emerald-deep); font-weight:600;}
  .xp-item h3{font-size:20px; font-weight:600; margin-bottom:3px;}
  .xp-item .place{color:var(--slate); font-size:14.5px; font-style:italic; margin-bottom:12px;}
  .xp-item ul{padding-left:18px; font-size:14.5px; color:var(--ink); opacity:.85;}
  .xp-item li{margin-bottom:4px;}

  /* ---------- EDUCATION TIMELINE ---------- */
  .edu-track{position:relative; margin-top:40px; padding-left:28px; border-left:2px solid var(--line);}
  .edu-item{position:relative; padding-bottom:42px;}
  .edu-item:last-child{padding-bottom:0;}
  .edu-item::before{
    content:''; position:absolute; left:-33.5px; top:2px; width:11px; height:11px; border-radius:50%;
    background:var(--paper); border:2.5px solid var(--emerald); transition:background .25s ease, transform .25s ease;
  }
  .edu-item:hover::before{background:var(--emerald); transform:scale(1.2);}
  .edu-year{font-family:'IBM Plex Mono', monospace; font-size:12.5px; color:var(--emerald-deep); font-weight:600; letter-spacing:.03em;}
  .edu-item h3{font-size:19px; font-weight:600; margin:5px 0 3px;}
  .edu-item .place{color:var(--slate); font-size:14.5px; font-style:italic;}
  .edu-item .mention{display:inline-block; margin-top:8px; font-family:'IBM Plex Mono', monospace; font-size:11.5px; background:var(--amber); color:var(--ink); padding:3px 9px; border-radius:4px; font-weight:600;}

  /* ---------- INTERESTS ---------- */
  .int-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:22px; margin-top:36px;}
  @media(max-width:800px){ .int-grid{grid-template-columns:1fr;} }
  .int-card{background:var(--white); border:1px solid var(--line); border-radius:10px; padding:26px; display:flex; flex-direction:column; gap:10px; transition:transform .3s ease, box-shadow .3s ease;}
  .int-card:hover{transform:translateY(-5px); box-shadow:0 16px 32px rgba(16,31,60,.08);}
  .int-card .icon{width:34px; height:34px; border-radius:8px; background:var(--paper-2); display:flex; align-items:center; justify-content:center; color:var(--emerald-deep); transition:background .25s ease, color .25s ease, transform .3s ease;}
  .int-card:hover .icon{background:var(--emerald); color:var(--white); transform:rotate(-8deg);}
  .int-card h3{font-size:17px; font-weight:600;}
  .int-card p{font-size:14px; color:var(--slate);}

  /* ---------- CONTACT / FOOTER ---------- */
  #contact{background:var(--ink); color:var(--white); border-radius:18px 18px 0 0; margin-top:20px;}
  #contact .wrap{display:flex; flex-direction:column; align-items:flex-start; gap:20px;}
  #contact h2{color:var(--white); font-size:clamp(32px,5vw,48px);}
  #contact p{color:rgba(255,255,255,.65); max-width:460px;}
  .contact-links{display:flex; gap:14px; flex-wrap:wrap; margin-top:8px;}
  .btn{
    font-family:'IBM Plex Mono', monospace; font-size:13.5px; padding:12px 20px; border-radius:30px;
    text-decoration:none; display:inline-flex; align-items:center; gap:8px;
    transition:background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  }
  .btn:hover{transform:translateY(-2px);}
  .btn.primary{background:var(--emerald); color:var(--white);}
  .btn.primary:hover{background:#22916b; box-shadow:0 10px 20px rgba(27,122,91,.25);}
  .btn.ghost{border:1px solid rgba(255,255,255,.25); color:var(--white);}
  .btn.ghost:hover{border-color:var(--white);}
  #contact .foot-note{margin-top:40px; font-size:12.5px; color:rgba(255,255,255,.4); padding-bottom:70px;}

  ::selection{background:var(--amber); color:var(--ink);}