:root {
      /* DARK MODE (default) */
      --bg:        #06070b;
      --surface:   #0e0f17;
      --card:      #121320;
      --border:    #23243a;

      --text:      #f2f3f7;      
      --muted:     #a1a3b8;      

      --gold:      #c9a84c;
      --gold-lt:   #e6cc7a;
      --cyan:      #4dd9c0;

      --r: 14px;
    }

    body.light-mode {
      /* LIGHT MODE */
      --bg:        #f7f6f2;
      --surface:   #efede6;
      --card:      #ffffff;
      --border:    #d6d3c6;

      --text:      #1c1d22;      
      --muted:     #5c5f6f;      

      --gold:      #a07828;
      --gold-lt:   #c59b3c;
      --cyan:      #1a8a76;
    }
    body.light-mode #bg-canvas { opacity: 0.08; }
    body.light-mode nav {
      background: rgba(251,250,247,0.86);
      border-bottom: 1px solid rgba(65,55,35,0.12);
      box-shadow: 0 10px 30px rgba(35,29,18,0.06);
    }
    body.light-mode .nav-drawer {
      background: rgba(251,250,247,0.98);
      border-bottom: 1px solid rgba(65,55,35,0.12);
      box-shadow: 0 18px 40px rgba(35,29,18,0.10);
    }
    body.light-mode footer {
      background: var(--surface);
      border-top: 1px solid var(--border);
    }

    /* Better light mode contrast + cleaner premium feel */
    body.light-mode {
      background:
        radial-gradient(circle at 15% 10%, rgba(183,137,47,0.12), transparent 28%),
        radial-gradient(circle at 85% 22%, rgba(15,118,110,0.10), transparent 30%),
        var(--bg);
      color: var(--text);
    }
    body.light-mode h1,
    body.light-mode h2,
    body.light-mode .proj-title,
    body.light-mode .cert-name,
    body.light-mode .contact-heading {
      color: #15131d;
    }
    body.light-mode .hero-bio,
    body.light-mode .about-text p,
    body.light-mode .proj-desc,
    body.light-mode .contact-desc,
    body.light-mode .contact-tagline,
    body.light-mode .footer-copy,
    body.light-mode .hl-lbl,
    body.light-mode .stat-lbl {
      color: #625d69;
    }
    body.light-mode .nav-links a,
    body.light-mode .nav-drawer-links li a,
    body.light-mode .s-chip,
    body.light-mode .cert-verify,
    body.light-mode .theme-toggle {
      color: #575260;
    }
    body.light-mode .nav-links a:hover,
    body.light-mode .nav-drawer-links li a:hover,
    body.light-mode .cert-verify:hover {
      color: var(--gold);
    }
    body.light-mode .nav-logo,
    body.light-mode h1 .line-italic,
    body.light-mode .h2-gold-italic,
    body.light-mode .hl-num,
    body.light-mode .stat-num {
      color: #9a6f24;
    }
    body.light-mode h1 .line-gold,
    body.light-mode .line-gold {
      -webkit-text-stroke: 1px rgba(138,100,31,0.62);
      text-shadow: none;
    }
    body.light-mode .btn-gold {
      background: linear-gradient(135deg,#8a641f,#d6a943);
      color: #fffdf8;
      box-shadow: 0 10px 24px rgba(138,100,31,0.20);
    }
    body.light-mode .btn-gold:hover {
      box-shadow: 0 14px 34px rgba(138,100,31,0.28);
    }
    body.light-mode .btn-ghost {
      color: #1f1b29;
      background: rgba(255,255,255,0.62);
      border-color: rgba(65,55,35,0.18);
    }
    body.light-mode .btn-ghost:hover {
      color: var(--gold);
      border-color: rgba(138,100,31,0.45);
      background: #fff;
      box-shadow: 0 12px 30px rgba(35,29,18,0.08);
    }
    body.light-mode .s-chip,
    body.light-mode .sk,
    body.light-mode .hl-card,
    body.light-mode .proj-card,
    body.light-mode .cert-card,
    body.light-mode .contact-card {
      background: rgba(255,255,255,0.78);
      border-color: rgba(65,55,35,0.13);
      box-shadow: 0 14px 34px rgba(35,29,18,0.07);
    }
    body.light-mode .sk:hover,
    body.light-mode .hl-card:hover,
    body.light-mode .proj-card:hover,
    body.light-mode .cert-card:hover {
      border-color: rgba(138,100,31,0.36);
      box-shadow: 0 22px 50px rgba(35,29,18,0.12);
    }
    body.light-mode .s-chip:hover {
      color: var(--cyan);
      border-color: rgba(15,118,110,0.35);
      background: rgba(15,118,110,0.06);
    }
    body.light-mode #about {
      background: linear-gradient(180deg,var(--bg),var(--surface));
    }
    body.light-mode #skills,
    body.light-mode #certifications {
      background: var(--surface);
    }
    body.light-mode #projects,
    body.light-mode #contact {
      background: var(--bg);
    }
    body.light-mode .proj-overlay {
      background: linear-gradient(to top,rgba(255,255,255,0.55) 0%,transparent 65%);
    }
    body.light-mode .proj-thumb,
    body.light-mode .cert-img {
      filter: brightness(0.96) saturate(1.05);
    }
    body.light-mode .proj-card:hover .proj-thumb,
    body.light-mode .cert-card:hover .cert-img {
      filter: brightness(1) saturate(1.12);
    }
    body.light-mode .nav-burger {
      border-color: rgba(65,55,35,0.16);
    }
    body.light-mode .nav-burger span {
      background: #1f1b29;
    }
    body.light-mode .nav-drawer-links li a {
      border-bottom-color: rgba(65,55,35,0.08);
    }

    /* ── THEME TOGGLE ── */
    .theme-toggle {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      background: transparent;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 100px;
      padding: 0.3rem 0.75rem;
      cursor: pointer;
      font-family: 'Space Mono', monospace;
      font-size: 0.65rem;
      letter-spacing: 0.1em;
      color: var(--muted);
      transition: all 0.25s;
      flex-shrink: 0;
    }
    .theme-toggle:hover { border-color: var(--gold); color: var(--gold-lt); }
    body.light-mode .theme-toggle { border-color: rgba(0,0,0,0.15); }
    .theme-toggle .toggle-track {
      width: 28px; height: 16px;
      background: var(--border);
      border-radius: 100px;
      position: relative;
      transition: background 0.3s;
      flex-shrink: 0;
    }
    body.light-mode .theme-toggle .toggle-track { background: var(--gold); }
    .theme-toggle .toggle-thumb {
      position: absolute;
      top: 2px; left: 2px;
      width: 12px; height: 12px;
      background: var(--gold-lt);
      border-radius: 50%;
      transition: transform 0.3s, background 0.3s;
    }
    body.light-mode .theme-toggle .toggle-thumb {
      transform: translateX(12px);
      background: #fff;
    }
    .toggle-icon { font-size: 0.85rem; line-height: 1; }
    *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
    html{scroll-behavior:smooth;overflow-x:hidden;max-width:100%}
    body{
      background:var(--bg);
      color:var(--text);
      font-family:'Space Grotesk',sans-serif;
      font-weight:300;
      line-height:1.75;
      overflow-x:hidden;
      max-width:100%;
      width:100%;
    }

    /* ── CANVAS BG ── */
    #bg-canvas{
      position:fixed;inset:0;z-index:0;
      pointer-events:none;opacity:0.55;
    }

    /* ── NAV ── */
    nav{
      position:fixed;top:0;left:0;right:0;z-index:200;
      padding:0 3rem;
      height:64px;
      display:flex;align-items:center;justify-content:space-between;
      background:rgba(5,5,9,0.6);
      -webkit-backdrop-filter:blur(20px);
      backdrop-filter:blur(20px);
      border-bottom:1px solid rgba(255,255,255,0.04);
    }
    .nav-logo{
      font-family:'Playfair Display',serif;
      font-size:1.35rem;
      color:var(--gold-lt);
      text-decoration:none;
      letter-spacing:0.03em;
    }
    .nav-links{display:flex;gap:2.5rem;list-style:none}
    .nav-links a{
      font-family:'Space Mono',monospace;
      font-size:0.7rem;
      letter-spacing:0.14em;
      text-transform:uppercase;
      color:var(--muted);
      text-decoration:none;
      position:relative;
      transition:color 0.3s;
    }
    .nav-links a::after{
      content:'';position:absolute;left:0;bottom:-4px;
      width:0;height:1px;background:var(--gold);
      transition:width 0.3s;
    }
    .nav-links a:hover{color:var(--gold-lt)}
    .nav-links a:hover::after{width:100%}

    /* ── HERO ── */
    #hero{
      position:relative;z-index:1;
      min-height:100vh;
      display:flex;align-items:center;
      padding:8rem 3rem 5rem;
      overflow:hidden;
      width:100%;
      max-width:100vw;
    }
    .hero-grid{
      max-width:1200px;margin:0 auto;width:100%;
      display:grid;
      grid-template-columns:1fr 380px;
      gap:6rem;align-items:center;
      overflow:hidden;
    }

    /* floating orbs */
    .orb{
      position:absolute;border-radius:50%;
      filter:blur(80px);pointer-events:none;
    }
    .orb-1{width:700px;height:700px;background:radial-gradient(circle,rgba(201,168,76,0.13),transparent 65%);top:-200px;right:-150px;animation:orb-drift 12s ease-in-out infinite alternate;overflow:hidden}
    .orb-2{width:500px;height:500px;background:radial-gradient(circle,rgba(77,217,192,0.09),transparent 65%);bottom:-100px;left:5%;animation:orb-drift 16s ease-in-out infinite alternate-reverse}
    .orb-3{width:300px;height:300px;background:radial-gradient(circle,rgba(201,168,76,0.07),transparent 65%);top:30%;left:40%;animation:orb-drift 9s ease-in-out infinite alternate}
    @keyframes orb-drift{from{transform:translate(0,0) scale(1)}to{transform:translate(30px,20px) scale(1.08)}}

    /* eyebrow */
    .eyebrow{
      display:inline-flex;align-items:center;gap:0.6rem;
      font-family:'Space Mono',monospace;
      font-size:0.68rem;letter-spacing:0.2em;text-transform:uppercase;
      color:var(--gold);margin-bottom:1.4rem;
      opacity:0;animation:rise 0.7s 0.15s forwards;
    }
    .eyebrow-line{width:28px;height:1px;background:var(--gold)}

    h1{
      font-family:'Playfair Display',serif;
      font-size:clamp(3.2rem,6.5vw,5.8rem);
      line-height:1.05;
      font-weight:700;
      color:var(--text);
      margin-bottom:1.6rem;
      opacity:0;animation:rise 0.8s 0.3s forwards;
    }
    h1 .line-gold{
      display:block;
      color:transparent;
      -webkit-text-stroke:1px var(--gold);
    }
    h1 .line-italic{
      display:block;
      font-style:italic;
      color:var(--gold-lt);
    }

    .hero-bio{
      font-size:1.05rem;color:var(--muted);
      max-width:500px;margin-bottom:2.8rem;
      opacity:0;animation:rise 0.8s 0.48s forwards;
      line-height:1.8;
    }
    .hero-location{
      display:inline-flex;align-items:center;gap:0.4rem;
      font-family:'Space Mono',monospace;
      font-size:0.78rem;letter-spacing:0.06em;
      color:var(--gold);
      margin-bottom:1.4rem;
      opacity:0;animation:rise 0.8s 0.4s forwards;
    }

    .cta-row{
      display:flex;gap:1rem;flex-wrap:wrap;
      opacity:0;animation:rise 0.8s 0.64s forwards;
    }
    .btn{
      display:inline-flex;align-items:center;gap:0.5rem;
      padding:0.82rem 1.8rem;border-radius:8px;
      font-family:'Space Mono',monospace;
      font-size:0.75rem;letter-spacing:0.08em;
      text-decoration:none;cursor:pointer;border:none;
      transition:all 0.25s;
    }
    .btn-gold{
      background:linear-gradient(135deg,var(--gold),var(--gold-lt));
      color:#050509;font-weight:700;
    }
    .btn-gold:hover{transform:translateY(-3px);box-shadow:0 10px 32px rgba(201,168,76,0.35)}
    .btn-ghost{
      background:transparent;color:var(--text);
      border:1px solid rgba(255,255,255,0.12);
    }
    .btn-ghost:hover{border-color:var(--gold);color:var(--gold-lt);transform:translateY(-3px)}

    .socials{
      display:flex;gap:0.8rem;flex-wrap:wrap;
      margin-top:2rem;
      opacity:0;animation:rise 0.8s 0.82s forwards;
    }
    .s-chip{
      display:inline-flex;align-items:center;gap:0.45rem;
      padding:0.38rem 0.9rem;
      border:1px solid rgba(255,255,255,0.08);
      border-radius:100px;
      font-family:'Space Mono',monospace;font-size:0.68rem;
      color:var(--muted);text-decoration:none;
      background:rgba(255,255,255,0.02);
      -webkit-backdrop-filter:blur(6px);
      backdrop-filter:blur(6px);
      transition:all 0.25s;
    }
    .s-chip:hover{border-color:var(--cyan);color:var(--cyan);background:rgba(77,217,192,0.06)}

    /* photo */
    .hero-photo-col{
      opacity:0;animation:photo-in 1.2s 0.9s forwards;
      position:relative;
    }
    @keyframes photo-in{
      from{opacity:0;transform:translateY(24px) scale(0.97)}
      to{opacity:1;transform:translateY(0) scale(1)}
    }
    .photo-frame{
      position:relative;
      width:320px;height:320px;
      margin:0 auto;
    }
    .photo-frame img{
      width:100%;height:100%;
      object-fit:cover;
      border-radius:50%;
      filter:grayscale(10%) brightness(0.95);
      position:relative;z-index:2;
    }
    .photo-ring{
      position:absolute;inset:-14px;
      border-radius:50%;
      border:1px solid rgba(201,168,76,0.25);
      z-index:1;
      animation:spin-ring 20s linear infinite;
    }
    .photo-ring-2{
      position:absolute;inset:-28px;
      border-radius:50%;
      border:1px dashed rgba(77,217,192,0.12);
      z-index:1;
      animation:spin-ring 32s linear infinite reverse;
    }
    @keyframes spin-ring{to{transform:rotate(360deg)}}
    .photo-dot{
      position:absolute;width:10px;height:10px;
      background:var(--gold);border-radius:50%;
      top:-14px;left:50%;transform:translateX(-50%);
      z-index:3;box-shadow:0 0 12px var(--gold);
    }

    .stat-row{
      display:flex;gap:1.5rem;justify-content:center;
      margin-top:1.8rem;
    }
    .stat{text-align:center}
    .stat-num{
      font-family:'Playfair Display',serif;
      font-size:1.6rem;font-weight:700;
      color:var(--gold-lt);display:block;
    }
    .stat-lbl{
      font-family:'Space Mono',monospace;
      font-size:0.62rem;letter-spacing:0.12em;
      text-transform:uppercase;color:var(--muted);
    }

    /* ── SHARED ── */
    section{padding:7rem 3rem;position:relative;z-index:1;width:100%;max-width:100vw;overflow-x:hidden}
    .inner{max-width:1200px;margin:0 auto;width:100%;padding:0}
    .tag{
      font-family:'Space Mono',monospace;
      font-size:0.68rem;letter-spacing:0.2em;text-transform:uppercase;
      color:var(--gold);margin-bottom:0.5rem;
      display:flex;align-items:center;gap:0.6rem;
    }
    .tag::before{content:'';display:block;width:20px;height:1px;background:var(--gold)}
    h2{
      font-family:'Playfair Display',serif;
      font-size:clamp(2rem,4vw,3rem);
      color:var(--text);margin-bottom:0.8rem;line-height:1.15;
    }
    .sec-divider{
      width:56px;height:2px;
      background:linear-gradient(90deg,var(--gold),transparent);
      margin-bottom:3.5rem;
    }

    /* ── ABOUT STRIP ── */
    #about{
      background:linear-gradient(180deg,var(--bg),var(--surface));
      padding:5rem 3rem;
    }
    .about-grid{
      display:grid;grid-template-columns:1fr 1fr;
      gap:5rem;align-items:center;
    }
    .about-text p{
      color:var(--muted);font-size:0.98rem;margin-bottom:1rem;line-height:1.85;
    }
    .about-highlights{
      display:grid;grid-template-columns:1fr 1fr;gap:1rem;
    }
    .hl-card{
      background:rgba(255,255,255,0.02);
      border:1px solid var(--border);
      border-radius:var(--r);
      padding:1.4rem 1.2rem;
      transition:all 0.3s;
    }
    .hl-card:hover{border-color:rgba(201,168,76,0.3);background:rgba(201,168,76,0.03)}
    .hl-num{
      font-family:'Playfair Display',serif;
      font-size:2rem;font-weight:700;
      color:var(--gold-lt);display:block;
    }
    .hl-lbl{
      font-family:'Space Mono',monospace;
      font-size:0.68rem;letter-spacing:0.1em;
      text-transform:uppercase;color:var(--muted);
    }

    /* ── SKILLS ── */
    #skills{background:var(--surface)}
    .skills-wrap{
      display:grid;
      grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
      gap:0.9rem;
    }
    .sk{
      background:var(--card);
      border:1px solid var(--border);
      border-radius:var(--r);
      padding:1.4rem 1rem;
      text-align:center;
      cursor:default;
      transition:all 0.3s;
      position:relative;overflow:hidden;
    }
    .sk::before{
      content:'';position:absolute;
      inset:0;background:linear-gradient(135deg,rgba(201,168,76,0.06),transparent);
      opacity:0;transition:opacity 0.3s;
    }
    .sk:hover{border-color:var(--gold);transform:translateY(-5px) scale(1.03);box-shadow:0 12px 36px rgba(0,0,0,0.5)}
    .sk:hover::before{opacity:1}
    .sk-icon{font-size:2rem;margin-bottom:0.6rem;display:block}
    .sk-name{
      font-family:'Space Mono',monospace;
      font-size:0.72rem;color:var(--text);
      letter-spacing:0.06em;
    }

    /* ── PROJECTS ── */
    #projects{background:var(--bg)}
    .proj-grid{
      display:grid;
      grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
      gap:1.6rem;
    }
    .proj-card{
      background:var(--card);
      border:1px solid var(--border);
      border-radius:var(--r);
      overflow:hidden;
      display:flex;flex-direction:column;
      transition:all 0.35s;
      position:relative;
    }
    .proj-card::after{
      content:'';
      position:absolute;inset:0;
      background:linear-gradient(135deg,rgba(201,168,76,0.04),rgba(77,217,192,0.04));
      opacity:0;transition:opacity 0.35s;pointer-events:none;
    }
    .proj-card:hover{transform:translateY(-8px);border-color:rgba(201,168,76,0.35);box-shadow:0 24px 60px rgba(0,0,0,0.6)}
    .proj-card:hover::after{opacity:1}
    .proj-thumb-wrap{position:relative;overflow:hidden;height:190px}
    .proj-thumb{
      width:100%;height:100%;object-fit:cover;
      filter:grayscale(20%) brightness(0.75) saturate(1.1);
      transition:all 0.5s;transform:scale(1.02);
    }
    .proj-card:hover .proj-thumb{filter:grayscale(0%) brightness(0.9) saturate(1.2);transform:scale(1.07)}
    .proj-overlay{
      position:absolute;inset:0;
      background:linear-gradient(to top,rgba(5,5,9,0.7) 0%,transparent 60%);
    }
    .proj-body{padding:1.6rem;flex:1;display:flex;flex-direction:column}
    .proj-title{
      font-family:'Playfair Display',serif;
      font-size:1.15rem;color:var(--text);
      margin-bottom:0.55rem;
    }
    .proj-desc{font-size:0.84rem;color:var(--muted);flex:1;margin-bottom:1.2rem;line-height:1.75}
    .proj-link{
      font-family:'Space Mono',monospace;
      font-size:0.72rem;color:var(--cyan);
      text-decoration:none;letter-spacing:0.06em;
      display:inline-flex;align-items:center;gap:0.4rem;
      transition:gap 0.2s,opacity 0.2s;
    }
    .proj-link:hover{gap:0.7rem}

    /* explore card */
    .explore-card{
      border-style:dashed;
      background:transparent;
      display:flex;align-items:center;justify-content:center;
    }
    .explore-card:hover{background:rgba(201,168,76,0.03)}
    .explore-inner{text-align:center;padding:2rem}
    .explore-icon{
      width:64px;height:64px;border-radius:50%;
      background:rgba(201,168,76,0.08);
      border:1px solid rgba(201,168,76,0.2);
      display:flex;align-items:center;justify-content:center;
      font-size:1.6rem;margin:0 auto 1rem;
    }

    /* ── CERTS ── */
    #certifications{background:var(--surface)}
    .certs-grid{
      display:grid;
      grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
      gap:1.5rem;
    }
    .cert-card{
      background:var(--card);
      border:1px solid var(--border);
      border-radius:var(--r);
      overflow:hidden;
      display:flex;flex-direction:column;
      transition:all 0.3s;
    }
    .cert-card:hover{border-color:var(--gold);transform:translateY(-5px);box-shadow:0 16px 48px rgba(0,0,0,0.5)}
    .cert-img{width:100%;height:150px;object-fit:cover;filter:grayscale(15%) brightness(0.78);transition:filter 0.4s}
    .cert-card:hover .cert-img{filter:grayscale(0%) brightness(0.95)}
    .cert-body{padding:1.4rem;flex:1;display:flex;flex-direction:column}
    .cert-issuer{
      font-family:'Space Mono',monospace;
      font-size:0.65rem;letter-spacing:0.16em;
      text-transform:uppercase;color:var(--gold);margin-bottom:0.4rem;
    }
    .cert-name{
      font-family:'Playfair Display',serif;
      font-size:1rem;color:var(--text);flex:1;margin-bottom:0.9rem;
    }
    .cert-verify{
      font-family:'Space Mono',monospace;font-size:0.7rem;
      color:var(--muted);text-decoration:none;letter-spacing:0.05em;
      transition:color 0.2s;display:inline-flex;align-items:center;gap:0.3rem;
    }
    .cert-verify:hover{color:var(--gold)}

    /* ── CONTACT ── */
    #contact{
      background:var(--bg);
      text-align:center;padding:8rem 3rem;
    }
    .contact-wrap{
      max-width:640px;margin:0 auto;
      position:relative;
    }
    .contact-glow{
      position:absolute;
      width:600px;height:300px;
      background:radial-gradient(ellipse,rgba(201,168,76,0.08),transparent 65%);
      top:50%;left:50%;transform:translate(-50%,-50%);
      pointer-events:none;
    }
    .contact-card{
      position:relative;z-index:1;
      background:var(--card);
      border:1px solid rgba(201,168,76,0.15);
      border-radius:24px;
      padding:3.5rem;
      -webkit-backdrop-filter:blur(12px);
      backdrop-filter:blur(12px);
      box-shadow:0 32px 80px rgba(0,0,0,0.3),inset 0 1px 0 rgba(255,255,255,0.04);
      transition:background 0.3s,box-shadow 0.3s;
    }
    body.light-mode .contact-card{
      box-shadow:0 32px 80px rgba(0,0,0,0.1),inset 0 1px 0 rgba(255,255,255,0.6);
    }
    body.light-mode .contact-glow{
      background:radial-gradient(ellipse,rgba(160,120,40,0.12),transparent 65%);
    }
    .contact-tagline{
      font-family:'Playfair Display',serif;
      font-size:1.1rem;font-style:italic;
      color:var(--muted);margin-bottom:0.5rem;
    }
    .contact-heading{
      font-family:'Playfair Display',serif;
      font-size:2.2rem;color:var(--text);margin-bottom:1rem;
    }
    .contact-desc{
      font-size:0.9rem;color:var(--muted);
      margin-bottom:2.2rem;line-height:1.8;
    }
    .contact-btns{
      display:flex;justify-content:center;gap:0.9rem;flex-wrap:wrap;
    }

    /* ── FOOTER ── */
    footer{
      border-top:1px solid var(--border);
      padding:2rem 3rem;
      display:flex;justify-content:space-between;align-items:center;
      position:relative;z-index:1;
    }
    .footer-logo{
      font-family:'Playfair Display',serif;
      font-size:1rem;color:var(--gold);text-decoration:none;
    }
    .footer-copy{
      font-family:'Space Mono',monospace;
      font-size:0.65rem;color:var(--muted);letter-spacing:0.1em;
    }

    /* ── REVEAL ── */
    .reveal{opacity:0;transform:translateY(32px);transition:opacity 0.75s ease,transform 0.75s ease}
    .reveal.visible{opacity:1;transform:none}

    /* ── ANIMS ── */
    @keyframes rise{
      from{opacity:0;transform:translateY(20px)}
      to{opacity:1;transform:translateY(0)}
    }

    /* ── RESPONSIVE ── */
    /* ── TABLET (≤900px) ── */
    @media(max-width:900px){
      .hero-grid{grid-template-columns:1fr;gap:3rem;text-align:center}
      .hero-photo-col{order:-1}
      .photo-frame{width:200px;height:200px}
      .eyebrow,.cta-row,.socials{justify-content:center}
      .hero-bio{margin-left:auto;margin-right:auto}
      .about-grid{grid-template-columns:1fr;gap:2.5rem}
      nav{padding:0 1.5rem}
      .nav-links{display:none !important;width:0;overflow:hidden;pointer-events:none}
      section{padding:5rem 1.5rem}
      .proj-grid{grid-template-columns:1fr 1fr}
      .certs-grid{grid-template-columns:1fr 1fr}
    }

    /* ── MOBILE (≤600px) ── */
    @media(max-width:600px){
      /* typography */
      h1{font-size:2.2rem;text-align:center}
      h2{font-size:1.7rem}

      /* nav */
      nav{padding:0 1.2rem;height:56px}
      .nav-logo{font-size:1.1rem}

      /* hero, tight, centered, compact */
      #hero{padding:5rem 1.2rem 2.5rem}
      .hero-grid{gap:1.4rem;text-align:center}
      .photo-frame{width:150px;height:150px}
      .photo-ring{inset:-10px}
      .photo-ring-2{inset:-20px}
      .eyebrow{justify-content:center;font-size:0.6rem;letter-spacing:0.14em;margin-bottom:0.8rem}
      .hero-bio{font-size:0.88rem;line-height:1.7;margin-bottom:1.6rem;text-align:center}
      .cta-row{flex-direction:column;align-items:stretch;gap:0.7rem}
      .cta-row .btn{width:100%;justify-content:center;padding:0.9rem 1rem;font-size:0.75rem}
      .socials{flex-wrap:wrap;justify-content:center;gap:0.5rem;margin-top:1.4rem}
      .s-chip{font-size:0.64rem;padding:0.32rem 0.7rem}

      /* sections */
      section{padding:3.5rem 1.2rem}
      #about{padding:3.5rem 1.2rem}

      /* about highlights */
      .about-highlights{grid-template-columns:1fr 1fr;gap:0.7rem}
      .hl-card{padding:1rem 0.8rem}
      .hl-num{font-size:1.2rem}

      /* skills */
      .skills-wrap{grid-template-columns:repeat(3,1fr);gap:0.6rem}
      .sk{padding:0.9rem 0.5rem}
      .sk-icon{font-size:1.4rem;margin-bottom:0.4rem}
      .sk-name{font-size:0.64rem}

      /* projects, single column */
      .proj-grid{grid-template-columns:1fr;gap:1rem}
      .proj-thumb-wrap{height:155px}

      /* certs, single column */
      .certs-grid{grid-template-columns:1fr;gap:1rem}

      /* contact */
      #contact{padding:4rem 1.2rem}
      .contact-card{padding:2rem 1.2rem;border-radius:16px}
      .contact-heading{font-size:1.5rem}
      .contact-tagline{font-size:0.9rem}
      .contact-desc{font-size:0.84rem}
      .contact-btns{flex-direction:column;align-items:stretch;gap:0.7rem}
      .contact-btns .btn{width:100%;justify-content:center;padding:0.9rem 1rem}

      /* footer */
      footer{flex-direction:column;gap:0.5rem;text-align:center;padding:1.5rem}
    }

    /* ── SMALL MOBILE (≤380px) ── */
    @media(max-width:380px){
      h1{font-size:2rem}
      .about-highlights{grid-template-columns:1fr}
      .skills-wrap{grid-template-columns:repeat(3,1fr)}
    }

    /* ── GLOBAL OVERFLOW FIX ── */
    @media(max-width:900px){
      .orb{display:none}
      #bg-canvas{width:100vw !important}
      .photo-ring-2{display:none}
      .proj-grid,.certs-grid,.skills-wrap,.about-highlights,.contact-btns{
        max-width:100%;
      }
      img{max-width:100%;height:auto}
      .hero-grid,.about-grid{overflow:hidden;max-width:100%}
      #hero,section,#about,#contact,footer{
        padding-left:1.2rem;
        padding-right:1.2rem;
        max-width:100vw;
        overflow-x:hidden;
      }
    }

    /* ── WEBKIT COMPAT (already handled inline by python, keeping class patches) ── */
    .line-gold {
      display: block;
      color: transparent;
      font-size: 0.55em;
      -webkit-text-stroke: 1px rgba(201,168,76,0.35);
      letter-spacing: 0.04em;
    }
    .btn-about { display: inline-flex; margin-top: 0.5rem; }
    .proj-title-explore { margin-bottom: 0.5rem; }
    .btn-explore { font-size: 0.72rem; margin-top: 0.5rem; }
    .h2-gold-italic { color: var(--gold-lt); font-style: italic; }
    .about-link-wrap { margin-top: 1rem; }

    /* ── HAMBURGER MENU ── */
    .nav-burger{
      display:none;
      flex-direction:column;justify-content:center;align-items:center;
      gap:5px;
      width:40px;height:40px;
      background:transparent;border:1px solid rgba(255,255,255,0.1);
      border-radius:8px;cursor:pointer;padding:0;
      transition:border-color 0.2s;
    }
    .nav-burger span{
      display:block;width:18px;height:1.5px;
      background:var(--text);border-radius:2px;
      transition:all 0.3s;
    }
    .nav-burger:hover{border-color:var(--gold)}
    .nav-burger.open span:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
    .nav-burger.open span:nth-child(2){opacity:0;transform:scaleX(0)}
    .nav-burger.open span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}

    .nav-drawer{
      position:fixed;top:56px;left:0;right:0;
      background:rgba(5,5,9,0.97);
      -webkit-backdrop-filter: blur(20px);
      backdrop-filter: blur(20px);
      border-bottom:1px solid rgba(255,255,255,0.06);
      z-index:199;
      padding:1rem 0;
      transform:translateY(-10px);
      opacity:0;
      pointer-events:none;
      visibility:hidden;
      transition:transform 0.25s ease,opacity 0.25s ease,visibility 0.25s;
    }
    .nav-drawer.open{
      transform:translateY(0);
      opacity:1;
      pointer-events:auto;
      visibility:visible;
    }
    .nav-drawer-links{list-style:none;padding:0}
    .nav-drawer-links li a{
      display:block;
      padding:0.9rem 2rem;
      font-family:'Space Mono',monospace;
      font-size:0.78rem;letter-spacing:0.14em;text-transform:uppercase;
      color:var(--muted);text-decoration:none;
      border-bottom:1px solid rgba(255,255,255,0.04);
      transition:color 0.2s,padding-left 0.2s;
    }
    .nav-drawer-links li a:hover{color:var(--gold-lt);padding-left:2.4rem}

    @media(max-width:900px){
      .nav-burger{display:flex}
      .nav-drawer{display:block}
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
      }

      #bg-canvas {
        display: none;
      }
    }