:root {
  --bg: #0a0b14;
  --bg-alt: #0e1020;
  --surface: #14162a;
  --surface-2: #1b1e38;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f3f9;
  --muted: #a6abc7;
  --faint: #71769a;
  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --accent: #f472b6;
  --grad: linear-gradient(120deg, #7c5cff 0%, #22d3ee 100%);
  --radius: 18px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --max: 1180px;
  --font: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Scroll progress */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 100; transition: width 0.1s linear;
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  transition: background 0.3s, border-color 0.3s, padding 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 11, 20, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav__brand span { color: var(--brand-2); }
.nav__links { display: flex; align-items: center; gap: 1.8rem; }
.nav__links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  background: var(--grad); color: #fff !important; padding: 0.55rem 1.2rem;
  border-radius: 999px; font-weight: 600;
}
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); transition: 0.3s; border-radius: 2px; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s; cursor: pointer; border: 1px solid transparent;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -10px rgba(124, 92, 255, 0.6); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -10px rgba(124, 92, 255, 0.75); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-3px); }

/* HERO */
.hero { position: relative; padding: 9rem 0 5rem; overflow: hidden; }
.hero__glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.22), transparent 60%);
  filter: blur(20px); pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
  padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.82rem; color: var(--muted); margin-bottom: 1.5rem;
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(52,211,153,0.5);} 70%{box-shadow:0 0 0 8px rgba(52,211,153,0);} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0);} }
.hero__title { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1.3rem; }
.hero__lead { color: var(--muted); font-size: 1.1rem; max-width: 38ch; margin-bottom: 2rem; }
.hero__lead strong { color: var(--text); }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.8rem; }
.hero__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; max-width: 560px; }
.stat__num { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.stat__label { font-size: 0.78rem; color: var(--faint); line-height: 1.3; }

/* code card */
.codecard {
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.codecard__bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); }
.codecard__bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.codecard__bar span:nth-child(2) { background: #febc2e; }
.codecard__bar span:nth-child(3) { background: #28c840; }
.codecard__bar em { margin-left: auto; font-style: normal; font-size: 0.78rem; color: var(--faint); font-family: "JetBrains Mono", monospace; }
.codecard pre { padding: 1.3rem; overflow-x: auto; }
.codecard code { font-family: "JetBrains Mono", monospace; font-size: 0.82rem; line-height: 1.7; color: #d7dbf0; }
.c-key { color: #c792ea; } .c-cls { color: #82aaff; } .c-fn { color: #82d8ff; } .c-str { color: #c3e88d; }

.hero__scroll { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 14px; display: flex; justify-content: center; }
.hero__scroll span { width: 4px; height: 8px; background: var(--brand-2); border-radius: 2px; margin-top: 7px; animation: scrolldot 1.6s infinite; }
@keyframes scrolldot { 0%{opacity:0;transform:translateY(-4px);} 50%{opacity:1;} 100%{opacity:0;transform:translateY(10px);} }

/* SECTION */
.section { padding: 6rem 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 680px; margin-bottom: 3rem; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 0.8rem; }
.section__title { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; }
.section__sub { color: var(--muted); margin-top: 0.8rem; }

/* ABOUT */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: start; }
.about__text p { color: var(--muted); margin-bottom: 1.2rem; }
.about__text strong { color: var(--text); }
.about__highlights { list-style: none; display: grid; gap: 1rem; }
.about__highlights li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.2rem;
  display: flex; flex-direction: column; transition: transform 0.2s, border-color 0.2s;
}
.about__highlights li:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.about__highlights strong { font-size: 1rem; }
.about__highlights span { color: var(--faint); font-size: 0.85rem; }

/* SKILLS */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.skillcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; transition: transform 0.25s, border-color 0.25s; }
.skillcard:hover { transform: translateY(-5px); border-color: var(--brand); }
.skillcard h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags span {
  font-size: 0.8rem; padding: 0.35rem 0.75rem; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-weight: 500;
}

/* TIMELINE */
.timeline { position: relative; display: grid; gap: 1.6rem; padding-left: 1.5rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--brand), var(--brand-2), transparent); }
.tl { position: relative; }
.tl__dot { position: absolute; left: -1.5rem; top: 1.6rem; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18); }
.tl__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.6rem; transition: transform 0.2s, border-color 0.2s; }
.tl__card:hover { transform: translateX(5px); border-color: var(--border-strong); }
.tl__top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.tl__top h3 { font-size: 1.12rem; }
.tl__org { color: var(--brand-2); font-size: 0.9rem; font-weight: 600; }
.tl__date { color: var(--faint); font-size: 0.85rem; font-family: "JetBrains Mono", monospace; white-space: nowrap; }
.tl__card ul { list-style: none; display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.tl__card li { color: var(--muted); font-size: 0.92rem; padding-left: 1.2rem; position: relative; }
.tl__card li::before { content: "▹"; position: absolute; left: 0; color: var(--brand-2); }
.tl__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tl__tags span { font-size: 0.74rem; padding: 0.25rem 0.6rem; border-radius: 6px; background: var(--surface-2); color: var(--faint); }

/* FILTERS */
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter { background: var(--surface); border: 1px solid var(--border); color: var(--muted); padding: 0.5rem 1.1rem; border-radius: 999px; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: 0.2s; font-family: var(--font); }
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.is-active { background: var(--grad); color: #fff; border-color: transparent; }

/* PROJECTS */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.pcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pcard:hover { transform: translateY(-6px); border-color: var(--brand); box-shadow: var(--shadow); }
.pcard__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.9rem; }
.pcard__cat { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-2); }
.pcard__role { font-size: 0.72rem; color: var(--faint); background: var(--surface-2); padding: 0.2rem 0.55rem; border-radius: 6px; }
.pcard h3 { font-size: 1.18rem; margin-bottom: 0.5rem; }
.pcard p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; flex: 1; }
.pcard .tags { margin-bottom: 1rem; }
.pcard__link { color: var(--brand-2); font-size: 0.88rem; font-weight: 600; margin-top: auto; transition: gap 0.2s; }
.pcard__link:hover { opacity: 0.8; }
.pcard.is-hidden { display: none; }

/* CASE STUDIES */
.cases { display: grid; gap: 1.5rem; }
.case { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; transition: border-color 0.25s; }
.case:hover { border-color: var(--border-strong); }
.case__tag { display: inline-block; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 0.7rem; }
.case h3 { font-size: 1.4rem; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.case__role { color: var(--faint); font-size: 0.88rem; margin-bottom: 1.5rem; font-family: "JetBrains Mono", monospace; }
.case__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.case__grid h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-2); margin-bottom: 0.5rem; }
.case__grid p { color: var(--muted); font-size: 0.9rem; }

/* CERTS */
.certs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.cert { display: flex; gap: 1.2rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: transform 0.2s, border-color 0.2s; }
.cert:hover { transform: translateY(-4px); border-color: var(--brand); }
.cert__icon { width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--grad); font-size: 1.4rem; color: #fff; }
.cert h3 { font-size: 1.08rem; }
.cert p { color: var(--muted); font-size: 0.88rem; }
.cert__date { font-size: 0.78rem; color: var(--faint); font-family: "JetBrains Mono", monospace; }

/* EDUCATION */
.edu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.3rem; }
.edu__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.edu__top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.edu__top h3 { font-size: 1.05rem; }
.edu__top span { color: var(--faint); font-size: 0.82rem; font-family: "JetBrains Mono", monospace; white-space: nowrap; }
.edu__item p { color: var(--muted); font-size: 0.9rem; }

/* CONTACT */
.contact { text-align: center; position: relative; overflow: hidden; }
.contact__inner { max-width: 720px; }
.contact__title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 0.5rem 0 1rem; }
.contact__lead { color: var(--muted); font-size: 1.08rem; margin-bottom: 2rem; }
.contact__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.contact__meta { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; color: var(--faint); font-size: 0.9rem; }

/* FOOTER */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; }
.footer__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--faint); font-size: 0.85rem; }

/* REVEAL ANIMATION */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 980px) {
  .hero__inner, .about { grid-template-columns: 1fr; }
  .hero__card { order: -1; }
  .skills, .projects, .case__grid { grid-template-columns: repeat(2, 1fr); }
  .nav__links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; background: var(--bg-alt);
    border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; transform: translateY(-130%); transition: transform 0.35s; align-items: stretch;
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 0.8rem 0; border-bottom: 1px solid var(--border); }
  .nav__cta { text-align: center; margin-top: 0.6rem; }
  .nav__toggle { display: flex; }
}
@media (max-width: 620px) {
  .section { padding: 4rem 0; }
  .hero { padding: 7rem 0 4rem; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .skills, .projects, .certs, .edu, .case__grid { grid-template-columns: 1fr; }
  .tl__card:hover { transform: none; }
}
