:root{
    --bg-base:#fbf7ff;
    --bg-surface:#ffffff;
    --bg-surface-alt:#f4eeff;
    --border-line:#e3d7f5;
    --text-primary:#241b3a;
    --text-muted:#5b5170;
    --text-faint:#a89bc2;
    --signal:#e0447a;
    --signal-soft:rgba(224,68,122,0.14);
    --wire:#0d9488;
    --wire-soft:rgba(13,148,136,0.12);
    --danger-line:#3a2f2f;
    --font-display:'Space Grotesk', sans-serif;
    --font-body:'Inter', sans-serif;
    --font-mono:'IBM Plex Mono', monospace;
    --rail-w:88px;
    --maxw:920px;
  }

  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  body{
    margin:0;
    background:var(--bg-base);
    color:var(--text-primary);
    font-family:var(--font-body);
    line-height:1.6;
    -webkit-font-smoothing:antialiased;
  }
  @media (prefers-reduced-motion: reduce){
    html{scroll-behavior:auto;}
    *{animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important;}
  }

  a{color:inherit;}
  ::selection{background:var(--signal-soft); color:var(--signal);}
  :focus-visible{outline:2px solid var(--wire); outline-offset:3px;}

  /* faint circuit-grid backdrop */
  body::before{
    content:"";
    position:fixed; inset:0;
    background-image:
      linear-gradient(var(--border-line) 1px, transparent 1px),
      linear-gradient(90deg, var(--border-line) 1px, transparent 1px);
    background-size:64px 64px;
    opacity:0.4;
    pointer-events:none;
    z-index:0;
  }

  /* ---------- Pipeline rail (desktop) ---------- */
  .rail{
    position:fixed;
    left:0; top:0; bottom:0;
    width:var(--rail-w);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    z-index:50;
    background:linear-gradient(180deg, transparent, var(--bg-base) 8%, var(--bg-base) 92%, transparent);
  }
  .rail-track{
    position:relative;
    display:flex;
    flex-direction:column;
    gap:0;
    height:70vh;
    justify-content:space-between;
    align-items:center;
  }
  .rail-line{
    position:absolute;
    left:50%; top:0; bottom:0;
    width:2px;
    background:var(--border-line);
    transform:translateX(-50%);
    z-index:0;
  }
  .rail-node{
    position:relative;
    z-index:1;
    width:34px; height:34px;
    border-radius:50%;
    border:1px solid var(--border-line);
    background:var(--bg-surface);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer;
    text-decoration:none;
    transition:border-color .3s ease, background .3s ease, transform .3s ease;
  }
  .rail-node::after{
    content:"";
    width:6px; height:6px;
    border-radius:50%;
    background:var(--text-faint);
    transition:background .3s ease, box-shadow .3s ease;
  }
  .rail-node .rail-label{
    position:absolute;
    left:46px;
    top:50%;
    transform:translateY(-50%);
    font-family:var(--font-mono);
    font-size:10px;
    letter-spacing:.06em;
    color:var(--text-faint);
    white-space:nowrap;
    opacity:0;
    transition:opacity .25s ease, transform .25s ease;
    pointer-events:none;
  }
  .rail-node:hover .rail-label{opacity:1; transform:translateY(-50%) translateX(2px);}
  .rail-node.active{border-color:var(--signal); transform:scale(1.08);}
  .rail-node.active::after{background:var(--signal); box-shadow:0 0 10px 2px var(--signal-soft);}
  .rail-node.active .rail-label{opacity:1; color:var(--signal);}

  @media (max-width: 980px){
    .rail{display:none;}
  }

  /* ---------- Mobile top nav ---------- */
  .topnav{
    display:none;
    position:sticky; top:0; z-index:60;
    background:rgba(16,19,28,0.92);
    backdrop-filter:blur(8px);
    border-bottom:1px solid var(--border-line);
    overflow-x:auto;
    white-space:nowrap;
    padding:14px 20px;
    gap:22px;
  }
  .topnav a{
    font-family:var(--font-mono);
    font-size:12px;
    letter-spacing:.05em;
    color:var(--text-muted);
    text-decoration:none;
    margin-right:22px;
  }
  .topnav a:last-child{margin-right:0;}
  @media (max-width: 980px){
    .topnav{display:block;}
  }

  /* ---------- Layout ---------- */
  main{
    position:relative;
    z-index:1;
    margin-left:var(--rail-w);
    padding:0 32px;
  }
  @media (max-width: 980px){
    main{margin-left:0; padding:0 20px;}
  }
  section{
    max-width:var(--maxw);
    margin:0 auto;
    padding:120px 0;
    border-bottom:1px solid var(--border-line);
  }
  section:last-of-type{border-bottom:none;}
  @media (max-width: 640px){
    section{padding:80px 0;}
  }

  .eyebrow{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-family:var(--font-mono);
    font-size:12px;
    letter-spacing:.12em;
    color:var(--wire);
    margin-bottom:18px;
  }
  .eyebrow::before{
    content:"";
    width:16px; height:1px;
    background:var(--wire);
  }

  h1,h2,h3{
    font-family:var(--font-display);
    font-weight:600;
    margin:0;
    color:var(--text-primary);
  }
  h2{font-size:clamp(28px,4vw,38px); margin-bottom:36px; letter-spacing:-0.01em;}
  p{color:var(--text-muted); margin:0 0 16px;}

  /* ---------- Hero ---------- */
  #hero{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding-top:60px;
    padding-bottom:60px;
    border-bottom:1px solid var(--border-line);
  }
  .terminal{
    font-family:var(--font-mono);
    font-size:13px;
    color:var(--text-muted);
    margin-bottom:28px;
    min-height:20px;
  }
  .terminal .cursor{
    display:inline-block;
    width:7px; height:14px;
    background:var(--signal);
    margin-left:2px;
    vertical-align:middle;
    animation:blink 1s step-end infinite;
  }
  @keyframes blink{50%{opacity:0;}}
  .hero-name{
    font-size:clamp(42px, 8vw, 76px);
    line-height:1.02;
    letter-spacing:-0.02em;
  }
  .hero-role{
    font-family:var(--font-mono);
    font-size:clamp(14px,2vw,17px);
    color:var(--wire);
    margin-top:18px;
    letter-spacing:.02em;
  }
  .hero-desc{
    max-width:560px;
    margin-top:22px;
    font-size:16px;
  }
  .hero-actions{
    display:flex;
    gap:14px;
    margin-top:32px;
    flex-wrap:wrap;
  }
  .btn{
    font-family:var(--font-mono);
    font-size:13px;
    letter-spacing:.03em;
    padding:13px 22px;
    border-radius:6px;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    gap:8px;
    transition:transform .2s ease, border-color .2s ease, background .2s ease;
    border:1px solid var(--border-line);
  }
  .btn-solid{
    background:var(--signal);
    color:#ffffff;
    border-color:var(--signal);
    font-weight:600;
  }
  .btn-solid:hover{transform:translateY(-2px);}
  .btn-outline{
    color:var(--text-primary);
    background:transparent;
  }
  .btn-outline:hover{border-color:var(--wire); color:var(--wire); transform:translateY(-2px);}

  .hero-meta{
    margin-top:56px;
    display:flex;
    gap:28px;
    flex-wrap:wrap;
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--text-faint);
  }
  .hero-meta span{color:var(--text-muted);}

  /* ---------- About ---------- */
  .about-grid{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:48px;
    align-items:start;
  }
  @media (max-width: 640px){
    .about-grid{grid-template-columns:1fr;}
  }
.avatar{
  width:300px; 
  height:400px;
  border-radius:20px; /* Smooth rounded corners matching your tech theme */
  border:1px solid var(--border-line);
  background:var(--bg-surface-alt);
  overflow:hidden; /* Keeps the image inside the rounded corners */
  flex-shrink:0;
  transition:transform .4s ease, border-color .3s ease;
}

.avatar img{
  width:100%;
  height:100%;
  object-fit:cover; /* Prevents image stretching or distortion */
  object-position:center;
  display:block;
}

.avatar:hover{
  transform:scale(1.02);
  border-color:var(--wire);
}
/* Adjust layout on mobile so the larger image centers nicely */
@media (max-width: 640px) {
  .avatar {
    width: 160px;
    height: 160px;
    margin: 0 auto; /* Centers the image on mobile */
  }
}
  .facts{
    margin-top:28px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px 24px;
  }
  @media (max-width:480px){.facts{grid-template-columns:1fr;}}
  .fact dt{
    font-family:var(--font-mono);
    font-size:11px;
    letter-spacing:.08em;
    color:var(--text-faint);
    text-transform:uppercase;
  }
  .fact dd{
    margin:4px 0 0;
    font-size:14px;
    color:var(--text-primary);
  }

  /* ---------- Skills ---------- */
  .skill-groups{
    display:grid;
    gap:28px;
  }
  .skill-group{
    background:var(--bg-surface);
    border:1px solid var(--border-line);
    border-radius:10px;
    padding:22px 24px;
  }
  .skill-group-head{
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    margin-bottom:14px;
  }
  .skill-group-head h3{
    font-size:15px;
    color:var(--text-primary);
  }
  .skill-group-head span{
    font-family:var(--font-mono);
    font-size:10px;
    color:var(--text-faint);
    letter-spacing:.06em;
  }
  .tags{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }
  .tag{
    font-family:var(--font-mono);
    font-size:12px;
    padding:6px 12px;
    border-radius:20px;
    border:1px solid var(--border-line);
    color:var(--text-muted);
    background:var(--bg-surface-alt);
  }
  .tag.on{
    border-color:var(--wire);
    color:var(--wire);
    background:var(--wire-soft);
  }

  /* ---------- Projects ---------- */
  .project-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px,1fr));
    gap:20px;
  }
  .project-card{
    background:var(--bg-surface);
    border:1px dashed var(--border-line);
    border-radius:10px;
    padding:24px;
    display:flex;
    flex-direction:column;
    gap:12px;
    position:relative;
  }
  .project-card .slot-tag{
    font-family:var(--font-mono);
    font-size:10px;
    color:var(--signal);
    letter-spacing:.08em;
    text-transform:uppercase;
  }
  .project-card h3{font-size:18px;}
  .project-card p{font-size:13.5px; margin-bottom:0;}
  .project-card .tags{margin-top:auto;}
  .project-note{
    margin-top:24px;
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--text-muted);
    border-left:2px solid var(--border-line);
    padding-left:14px;
  }

  /* ---------- Internship / timeline ---------- */
  .timeline{
    display:flex;
    flex-direction:column;
    gap:0;
  }
  .tl-item{
    position:relative;
    padding:0 0 40px 32px;
    border-left:1px solid var(--border-line);
  }
  .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(--signal);
    box-shadow:0 0 0 4px var(--bg-base);
  }
  .tl-head{
    display:flex;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:8px;
    align-items:baseline;
    margin-bottom:6px;
  }
  .tl-head h3{font-size:19px;}
  .tl-org{
    font-family:var(--font-mono);
    font-size:12px;
    color:var(--wire);
  }
  .tl-item ul{
    margin:12px 0 0;
    padding-left:18px;
    color:var(--text-muted);
    font-size:14px;
  }
  .tl-item li{margin-bottom:6px;}

  /* ---------- Certificates (empty state) ---------- */
  .cert-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
    gap:20px;
  }
  .cert-slot{
    border:1px dashed var(--border-line);
    border-radius:10px;
    padding:28px 20px;
    text-align:center;
    color:var(--text-muted);
    font-family:var(--font-mono);
    font-size:12px;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
  }
  .cert-slot .plus{
    width:30px; height:30px;
    border-radius:50%;
    border:1px solid var(--border-line);
    display:flex; align-items:center; justify-content:center;
    font-size:16px;
    color:var(--text-faint);
  }
  .cert-status{
    margin-top:20px;
    font-size:13px;
    color:var(--text-muted);
  }

  /* ---------- Contact ---------- */
  #contact{border-bottom:none;}
  .contact-card{
    background:var(--bg-surface);
    border:1px solid var(--border-line);
    border-radius:12px;
    padding:40px;
  }
  @media (max-width:640px){.contact-card{padding:28px 22px;}}
  .contact-links{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px 24px;
    margin-top:28px;
  }
  @media (max-width:520px){.contact-links{grid-template-columns:1fr;}}
  .contact-link{
    display:flex;
    flex-direction:column;
    gap:4px;
    text-decoration:none;
    padding:14px 16px;
    border:1px solid var(--border-line);
    border-radius:8px;
    transition:border-color .2s ease, transform .2s ease;
  }
  .contact-link:hover{border-color:var(--wire); transform:translateY(-2px);}
  .contact-link .k{
    font-family:var(--font-mono);
    font-size:10px;
    letter-spacing:.08em;
    color:var(--text-faint);
    text-transform:uppercase;
  }
  .contact-link .v{font-size:14px; color:var(--text-primary);}

  .reveal{
    opacity:0;
    transform:translateY(24px);
    transition:opacity .7s ease, transform .7s ease;
  }
  .reveal.in{
    opacity:1;
    transform:translateY(0);
  }
  .tag{transition:transform .2s ease, border-color .2s ease, color .2s ease;}
  .tag:hover{transform:translateY(-2px); border-color:var(--wire); color:var(--wire);}
  .avatar{transition:transform .4s ease;}
  .avatar:hover{transform:rotate(-4deg) scale(1.04);}

  footer{
    text-align:center;
    padding:36px 20px 48px;
    font-family:var(--font-mono);
    font-size:11px;
    color:var(--text-faint);
    position:relative; z-index:1;
  }



  .cert-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-line);
  border-radius: 10px;
  padding: 24px;
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.cert-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--wire);
  background: var(--wire-soft);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--wire);
}

.cert-issuer {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin: 6px 0 12px;
}

/* ---------- Chatbot widget ---------- */
#chatbot{
  position:fixed;
  bottom:24px;
  right:24px;
  z-index:999;
  font-family:var(--font-body);
  display:flex;
  flex-direction:column;
  align-items:flex-end;
}

#chatbot-toggle{
  font-family:var(--font-mono);
  font-size:13px;
  letter-spacing:.02em;
  padding:13px 20px;
  border-radius:24px;
  border:1px solid var(--signal);
  background:var(--signal);
  color:#ffffff;
  cursor:pointer;
  box-shadow:0 6px 20px rgba(224,68,122,0.28);
  transition:transform .2s ease, box-shadow .2s ease;
}
#chatbot-toggle:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(224,68,122,0.36);
}

#chatbot-box{
  width:320px;
  max-width:calc(100vw - 48px);
  height:420px;
  max-height:60vh;
  background:var(--bg-surface);
  border:1px solid var(--border-line);
  border-radius:14px;
  margin-top:12px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  box-shadow:0 12px 40px rgba(36,27,58,0.16);
}
#chatbot-box.hidden{display:none;}

#chatbot-box::before{
  content:"AI ASSISTANT";
  display:block;
  font-family:var(--font-mono);
  font-size:10px;
  letter-spacing:.1em;
  color:var(--wire);
  background:var(--wire-soft);
  border-bottom:1px solid var(--border-line);
  padding:10px 14px;
}

#chatbot-messages{
  flex:1;
  padding:14px;
  overflow-y:auto;
  font-size:13px;
  display:flex;
  flex-direction:column;
  gap:4px;
}

#chatbot-messages::-webkit-scrollbar{width:6px;}
#chatbot-messages::-webkit-scrollbar-thumb{background:var(--border-line); border-radius:6px;}

#chatbot-input-row{
  display:flex;
  border-top:1px solid var(--border-line);
  background:var(--bg-surface);
}

#chatbot-input{
  flex:1;
  border:none;
  padding:12px 14px;
  font-size:13px;
  font-family:var(--font-body);
  background:transparent;
  color:var(--text-primary);
}
#chatbot-input::placeholder{color:var(--text-faint);}
#chatbot-input:focus{outline:none;}

#chatbot-send{
  border:none;
  background:var(--wire);
  color:#fff;
  padding:0 18px;
  cursor:pointer;
  font-family:var(--font-mono);
  font-size:12px;
  letter-spacing:.03em;
  transition:background .2s ease;
}
#chatbot-send:hover{background:#0b7d73;}

.msg{
  margin-bottom:4px;
  padding:9px 12px;
  border-radius:10px;
  max-width:85%;
  font-size:13px;
  line-height:1.5;
  word-wrap:break-word;
}
.msg.user{
  background:var(--wire-soft);
  color:var(--text-primary);
  margin-left:auto;
  text-align:right;
  border-bottom-right-radius:2px;
}
.msg.bot{
  background:var(--bg-surface-alt);
  color:var(--text-primary);
  margin-right:auto;
  border-bottom-left-radius:2px;
}
.msg.bot-loading{
  background:var(--bg-surface-alt);
  color:var(--text-faint);
  margin-right:auto;
  font-family:var(--font-mono);
  font-size:12px;
  border-bottom-left-radius:2px;
}

@media (max-width:480px){
  #chatbot{right:16px; bottom:16px;}
  #chatbot-box{width:calc(100vw - 32px); height:65vh; max-height:65vh;}
}
