html, body { background: #fafaf9; }

:root {
  --bg: #fafaf9;
  --card: #ffffff;
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 16px rgba(17, 24, 39, 0.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
::selection { background: #dbeafe; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 10px; font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1f2937; }
.btn-outline { border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.btn-outline:hover { border-color: #cbd5e1; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; color: var(--ink); transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: #cbd5e1; color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-weight: 600; color: var(--ink); font-size: 16px; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a { padding: 8px 12px; border-radius: 8px; font-size: 14.5px; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--ink); background: #f3f4f6; }
.nav .btn { height: 38px; padding: 0 16px; font-size: 14px; }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); place-items: center; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 18px; height: 18px; }
.mobile-menu { display: none; border-top: 1px solid var(--line); padding: 8px 24px 16px; background: var(--bg); }
.mobile-menu a { display: block; padding: 12px 0; font-size: 16px; color: var(--ink); border-bottom: 1px solid var(--line); }
.nav.open .mobile-menu { display: block; }

/* Sections */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.section-title { font-size: clamp(26px, 3.2vw, 34px); font-weight: 600; margin-top: 8px; }
.section-intro { margin-top: 10px; color: var(--muted); max-width: 40rem; }
.section-head { margin-bottom: 40px; }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 700; letter-spacing: -0.03em; }
.hero .role { margin-top: 12px; font-size: clamp(17px, 2vw, 20px); color: var(--ink); font-weight: 500; }
.hero .role span { color: var(--muted); font-weight: 400; }
.hero p.lead { margin-top: 20px; font-size: 17px; max-width: 38rem; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; padding: 5px 12px; border-radius: 999px; margin-bottom: 20px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; }
.focus { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; list-style: none; }
.focus li { font-size: 14px; padding: 6px 12px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }


/* Skills */
.skill-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.skill-group h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; list-style: none; }
.skills li {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line); background: #fcfcfc;
  font-size: 13.5px; color: var(--ink); line-height: 1.3; transition: border-color .2s, transform .2s;
}
.skills li:hover { border-color: #bfdbfe; transform: translateY(-2px); }
.skills img { width: 36px; height: 36px; object-fit: contain; }

/* Career path */
.company { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.company-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.company-head h3 { font-size: 22px; font-weight: 600; }
.company-head .meta { font-size: 14.5px; color: var(--muted); }
.timeline { list-style: none; position: relative; margin-top: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline > li { position: relative; padding-left: 36px; padding-bottom: 28px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); border: 2px solid #cbd5e1;
}
.timeline > li.current::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px #dbeafe; }
.step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.step-head h4 { font-size: 17px; font-weight: 600; }
.badge { font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge.muted { background: #f3f4f6; color: var(--muted); }
.timeline p { margin-top: 6px; font-size: 15px; max-width: 46rem; }
.points { margin-top: 10px; padding-left: 18px; font-size: 15px; }
.points li { margin-top: 4px; }

/* Projects */
.subhead { font-size: 15px; font-weight: 600; color: var(--muted); margin: 48px 0 16px; }
.subhead.first { margin-top: 0; }
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s;
}
.project:hover { border-color: #d1d5db; box-shadow: var(--shadow); }
.project h3 { font-size: 19px; font-weight: 600; margin-top: 16px; }
.project .kind { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.project p { margin-top: 12px; font-size: 15px; }
.project .points { font-size: 14.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; list-style: none; }
.tags li { font-size: 12.5px; padding: 3px 10px; border-radius: 6px; background: #f3f4f6; color: #374151; }
.project-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: auto; padding-top: 20px; }
.link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent); }
.link:hover { text-decoration: underline; }
.link svg { width: 14px; height: 14px; }
.more { margin-top: 20px; font-size: 14.5px; color: var(--muted); }
.more a { color: var(--accent); }
.more a:hover { text-decoration: underline; }

/* Education */
.edu { display: grid; gap: 16px; }
.edu-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.edu-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 24px; }
.edu-item h3 { font-size: 18px; font-weight: 600; }
.edu-item .school { font-size: 15px; margin-top: 2px; }
.edu-item .years { font-size: 14px; color: var(--muted); white-space: nowrap; }
.edu-item .detail { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.awards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; list-style: none; }
.awards li { font-size: 13.5px; padding: 5px 12px; border-radius: 8px; background: #fefce8; border: 1px solid #fde68a; color: #854d0e; }
.post {
  margin-top: 20px; display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fcfcfc; transition: border-color .2s;
}
.post:hover { border-color: #93c5fd; }
.post img { width: 120px; height: 160px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); }
.post .src { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.post .src svg { width: 16px; height: 16px; fill: #0a66c2; }
.post h4 { font-size: 16px; font-weight: 600; margin-top: 8px; }
.post p { font-size: 14.5px; margin-top: 6px; }
.post .link { margin-top: 10px; }

/* Contact */
.contact-box { background: var(--ink); color: #e5e7eb; border-radius: 20px; padding: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.contact-box h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); font-weight: 600; }
.contact-box p { margin-top: 8px; color: #9ca3af; }
.contact-box .email { display: inline-block; margin-top: 16px; font-size: 18px; color: #fff; border-bottom: 1px solid #4b5563; }
.contact-box .email:hover { border-color: #fff; }
.contact-actions { display: flex; gap: 10px; }
.contact-actions .icon-btn { background: #1f2937; border-color: #374151; color: #fff; }
.contact-actions .icon-btn:hover { border-color: #6b7280; color: #fff; }

footer { padding: 32px 0; font-size: 14px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot a:hover { color: var(--ink); }

/* Hero: typing desk */
.desk { width: 100%; display: grid; gap: 12px; }
.editor { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.editor-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f9fafb; }
.editor-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e5e7eb; }
.editor-bar i:nth-child(1) { background: #f87171; } .editor-bar i:nth-child(2) { background: #fbbf24; } .editor-bar i:nth-child(3) { background: #34d399; }
.editor-bar span { margin-left: 8px; font-size: 12.5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code { margin: 0; padding: 16px 18px; height: 262px; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.7; color: #1f2937; white-space: pre; }
.code .k { color: #7c3aed; } .code .s { color: #059669; } .code .f { color: #1d4ed8; } .code .d { color: #d97706; } .code .c { color: #9ca3af; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.keyboard { background: #eef0f3; border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 6px; }
.kb-row { display: flex; gap: 6px; justify-content: center; }
.key { flex: 1; max-width: 34px; height: 30px; border-radius: 6px; background: #fff; box-shadow: 0 1px 0 #cfd4dc; display: grid; place-items: center; font-size: 11px; color: #6b7280; transition: background .12s, color .12s, transform .12s; }
.key.space { max-width: 180px; flex: 6; }
.key.hit { background: var(--accent); color: #fff; transform: translateY(1px); box-shadow: none; }

/* Logos */
.company-name { display: flex; align-items: center; }
.ml-logo { height: 30px; width: auto; }
.ml-logo.sm { width: 22px; height: 22px; object-fit: cover; object-position: left; display: inline-block; vertical-align: -5px; margin-right: 10px; }
.project-head { display: flex; align-items: center; gap: 14px; }
.project-head h3 { margin-top: 0; }
.project-icon { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); object-fit: cover; flex-shrink: 0; background: #fff; }
.project-icon.lg { width: 60px; height: 60px; border-radius: 14px; }
.points.two-col { columns: 2; column-gap: 40px; }
.points.two-col li { break-inside: avoid; margin: 0 0 6px; }

/* Featured projects */
.featured { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; padding: 32px; align-items: center; }
.featured-copy { display: flex; flex-direction: column; }
.featured .project-links { padding-top: 24px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.stats-row div { border-top: 1px solid var(--line); padding-top: 10px; }
.stats-row b { display: block; font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.stats-row span { font-size: 13px; color: var(--muted); }
.shots { display: flex; gap: 14px; justify-content: center; background: #fff7ed; border-radius: 14px; padding: 20px; }
.shots img { height: 380px; width: auto; border-radius: 12px; box-shadow: 0 6px 20px rgba(17, 24, 39, .1); }
.shots img:last-child { margin-top: 28px; }
.fyp-img { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.fyp-img img { width: 100%; height: 100%; object-fit: cover; }

/* LinkedIn */
.li-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.li-card:hover { box-shadow: var(--shadow); border-color: #d1d5db; }
.li-banner { height: 120px; background: linear-gradient(120deg, #0a66c2, #3b82f6 60%, #93c5fd); display: flex; align-items: center; justify-content: flex-end; padding: 0 28px; }
.li-banner span { color: #fff; font-weight: 600; font-size: clamp(14px, 1.8vw, 20px); max-width: 26rem; text-align: right; line-height: 1.3; text-shadow: 0 1px 8px rgba(0, 0, 0, .2); }
.li-main { display: grid; grid-template-columns: 1fr 300px; gap: 24px; padding: 0 28px 28px; }
.li-body { margin-top: -56px; }
.li-photo {
  width: 112px; height: 112px; border-radius: 50%; border: 4px solid #fff; background: linear-gradient(135deg, #e0e7ff, #f1f5f9);
  display: grid; place-items: center; font-size: 34px; font-weight: 600; color: #1e3a8a; overflow: hidden; position: relative; margin-bottom: 12px;
}
.li-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.li-body h3 { font-size: 22px; font-weight: 600; }
.li-headline { font-size: 15px; color: var(--ink); margin-top: 2px; }
.li-body .loc { font-size: 14px; color: var(--muted); margin-top: 4px; }
.li-body .loc b { color: #0a66c2; font-weight: 600; }
.li-side { padding-top: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.li-side p { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.li-org { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.li-org.ml { object-fit: cover; object-position: left; }
.li-side .btn { margin-top: 6px; }
.btn-li { background: #0a66c2; color: #fff; }
.li-card:hover .btn-li { background: #004182; }
.btn-li svg { fill: currentColor; }

/* Subtle reveal */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .desk { max-width: 440px; }
  .skill-groups, .projects { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
  .li-main { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links, .nav .btn-primary { display: none; }
  .nav-toggle { display: grid; }
  .section { padding: 64px 0; }
  .hero { padding: 40px 0 64px; }
  .company { padding: 20px; }
  .edu-item { padding: 20px; }
  .post { grid-template-columns: 88px 1fr; gap: 14px; }
  .post img { width: 88px; height: 118px; }
  .li-main { padding: 0 20px 20px; }
  .shots img { height: 300px; }
  .key { height: 22px; font-size: 9px; }
  .contact-box { padding: 32px 24px; }
  .skills { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}
@media (max-width: 600px) {
  .featured { padding: 20px; gap: 20px; }
  .shots { padding: 14px; }
  .shots img { height: 260px; }
  .points.two-col { columns: 1; }
  .stats-row b { font-size: 18px; }
  .code { font-size: 11px; height: 228px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
