:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --ink: #14161a;
  --muted: #5c636e;
  --line: #e6e8ec;
  --accent: #2f6bff;
  --accent-soft: #eaf0ff;
  --code-bg: #0f1420;
  --radius: 14px;
  --max: 1080px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(0,0,0,.03); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.brand__mark { font-family: var(--mono); color: var(--accent); margin-right: 4px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { font-size: .93rem; color: var(--muted); font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 600; font-size: .95rem;
  padding: 12px 22px; border-radius: 10px; transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: 0 6px 18px rgba(47,107,255,.25);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(47,107,255,.32); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--bg-alt); box-shadow: none; }
.btn--sm { padding: 8px 16px; font-size: .88rem; }
.btn--lg { padding: 15px 30px; font-size: 1rem; margin-top: 12px; }
.btn-hire { color: #fff !important; font-size: .95rem !important; padding: 12px 22px !important;}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
  font-family: var(--mono); font-size: .82rem; color: var(--accent);
  background: var(--accent-soft); display: inline-block; padding: 5px 12px;
  border-radius: 30px; margin-bottom: 20px; font-weight: 500;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 800; }
.accent { color: var(--accent); }
#typed::after { content: "|"; color: var(--accent); animation: blink 1s step-end infinite; font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 520px; margin: 22px 0 30px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__meta { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-size: .9rem; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }

/* Code card */
.code { background: var(--code-bg); border-radius: var(--radius); padding: 20px; box-shadow: 0 24px 60px rgba(15,20,32,.28); }
.code__bar { display: flex; gap: 7px; margin-bottom: 16px; }
.code__bar span { width: 12px; height: 12px; border-radius: 50%; background: #3a4152; }
.code__bar span:nth-child(1){ background:#ff5f56;} .code__bar span:nth-child(2){ background:#ffbd2e;} .code__bar span:nth-child(3){ background:#27c93f;}
.code pre { font-family: var(--mono); font-size: .9rem; line-height: 1.8; color: #d7dbe6; overflow-x: auto; }
.c-key { color: #c792ea; } .c-var { color: #82aaff; } .c-prop { color: #f78c6c; } .c-str { color: #c3e88d; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section__num { font-family: var(--mono); font-size: .82rem; color: var(--accent); font-weight: 500; margin-bottom: 10px; }
.section__title { font-size: clamp(1.6rem, 3.4vw, 2.25rem); letter-spacing: -.02em; font-weight: 800; margin-bottom: 42px; }

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about__text p { color: var(--muted); margin-bottom: 18px; font-size: 1.03rem; }
.about__facts { list-style: none; display: grid; gap: 2px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.about__facts li { display: flex; justify-content: space-between; padding: 16px 20px; background: var(--bg); }
.section--alt .about__facts li { background: var(--bg-alt); }
.about__facts span { color: var(--muted); font-size: .92rem; }
.about__facts strong { font-weight: 600; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 22px; }
.skill-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.skill-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.06); border-color: transparent; }
.skill-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.skill-card p { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-family: var(--mono); font-size: .78rem; background: var(--accent-soft); color: var(--accent); padding: 5px 11px; border-radius: 7px; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -28px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-date { font-family: var(--mono); font-size: .8rem; color: var(--accent); }
.tl-item h3 { font-size: 1.12rem; margin-top: 4px; }
.tl-org { color: var(--muted); font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.tl-item > p:last-child { color: var(--muted); font-size: .97rem; }

/* Projects */
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 22px; }
.proj-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.proj-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.07); border-color: transparent; }
.proj-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.proj-card__top h3 { font-size: 1.12rem; }
.proj-card .year { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.proj-card p { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }

/* Certifications */
.certs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.cert { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 18px 20px; }
.cert strong { font-size: 1rem; }
.cert span { color: var(--muted); font-size: .88rem; font-family: var(--mono); }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.quotes blockquote { background: var(--bg-alt); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 26px; }
.section:not(.section--alt) .quotes blockquote { background: var(--bg-alt); }
.quotes p { font-size: .98rem; margin-bottom: 16px; }
.quotes cite { font-style: normal; font-weight: 600; font-size: .9rem; color: var(--muted); }

/* Contact */
.contact__lead { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin-bottom: 32px; }
.contact__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; max-width: 620px; margin-bottom: 8px; }
.contact__item { display: flex; flex-direction: column; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; transition: border-color .2s, transform .2s; }
a.contact__item:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact__item span { color: var(--muted); font-size: .85rem; }
.contact__item strong { font-size: 1.02rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer p { color: var(--muted); font-size: .9rem; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { color: var(--muted); font-size: .9rem; transition: color .2s; }
.footer__links a:hover { color: var(--accent); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero__inner, .about, .skills, .works, .quotes { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 64px; }
  .hero__card { order: -1; }
  .contact__grid { grid-template-columns: 1fr; }
  .nav__links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; transform: translateY(-120%); transition: transform .3s; align-items: stretch;
  }
  .nav__links.open { transform: none; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: 12px; border: 0; }
  .nav__toggle { display: flex; }
  .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); }
  .section { padding: 60px 0; }
}
