:root {
  --bg: #ffffff;
  --soft: #f5f7fa;
  --text: #1c2430;
  --muted: #5d6877;
  --line: #e3e8ef;
  --accent: #2557d6;
  --accent-dark: #1b43a8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
svg { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.12em; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }

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

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.nav.scrolled { box-shadow: 0 4px 18px rgba(28,36,48,.07); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.logo span { color: var(--accent); }
.nav nav a { color: var(--muted); margin-left: 20px; font-size: .92rem; padding: 4px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav nav a:hover, .nav nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Mobile menu: burger + full-screen overlay */
.burger {
  display: none; position: relative; z-index: 30;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.burger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, background .3s; }
.burger[aria-expanded="true"] span { background: #fff; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mm {
  position: fixed; inset: 0; z-index: 20;
  background: linear-gradient(160deg, #1b43a8 0%, #2557d6 55%, #3b6ff0 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  padding: 96px 32px 36px;
  clip-path: circle(0 at calc(100% - 42px) 38px);
  visibility: hidden;
  transition: clip-path .55s cubic-bezier(.7,0,.2,1), visibility 0s .55s;
}
.mm.open { clip-path: circle(150% at calc(100% - 42px) 38px); visibility: visible; transition: clip-path .55s cubic-bezier(.7,0,.2,1); }
.mm-links { display: flex; flex-direction: column; gap: 4px; }
.mm-links a {
  display: flex; align-items: baseline; gap: 16px;
  font-size: 2rem; font-weight: 700; color: #fff; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
  opacity: 0; transform: translateX(-24px);
  transition: opacity .4s, transform .4s, padding-left .2s;
}
.mm-links a i { font-style: normal; font-size: .8rem; font-weight: 600; color: #ffd166; letter-spacing: .08em; }
.mm-links a:active, .mm-links a:hover { padding-left: 8px; color: #fff; }
.mm.open .mm-links a { opacity: 1; transform: none; }
.mm.open .mm-links a:nth-child(1) { transition-delay: .20s; }
.mm.open .mm-links a:nth-child(2) { transition-delay: .26s; }
.mm.open .mm-links a:nth-child(3) { transition-delay: .32s; }
.mm.open .mm-links a:nth-child(4) { transition-delay: .38s; }
.mm.open .mm-links a:nth-child(5) { transition-delay: .44s; }
.mm.open .mm-links a:nth-child(6) { transition-delay: .50s; }
.mm-foot { opacity: 0; transition: opacity .4s .55s; }
.mm.open .mm-foot { opacity: 1; }
.mm-foot .social { margin-top: 0; }
.mm-foot .social a { border-color: rgba(255,255,255,.4); color: #fff; }
.mm-foot .social a:hover { background: #fff; color: var(--accent); border-color: #fff; }
.mm-cv { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 10px 18px; border-radius: 10px; background: #fff; color: var(--accent); font-weight: 700; }
.mm-cv:hover { color: var(--accent-dark); }
.mm-foot p { margin-top: 18px; font-size: .9rem; opacity: .85; }
@media (min-width: 761px) { .mm { display: none; } }
body.menu-open { overflow: hidden; }
body.menu-open .nav { background: transparent; backdrop-filter: none; border-bottom-color: transparent; box-shadow: none; }
body.menu-open .logo { color: #fff; }
body.menu-open .logo span { color: #ffd166; }
body.menu-open .burger { border-color: rgba(255,255,255,.6); background: transparent; }

/* Hero */
.hero {
  display: flex; align-items: center; gap: 56px;
  padding-top: 72px; padding-bottom: 72px;
}
.avatar-wrap { flex-shrink: 0; animation: float 5s ease-in-out infinite; }
.avatar {
  display: block; width: 260px; height: 260px;
  border-radius: 50%; object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(28,36,48,.14);
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.eyebrow { color: var(--accent); font-weight: 600; }
h1 { font-size: 2.8rem; line-height: 1.15; margin: 4px 0 8px; }
.role { font-size: 1.25rem; color: var(--muted); margin-bottom: 16px; min-height: 1.9em; }
.cursor { color: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { max-width: 520px; margin-bottom: 26px; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--text); font-weight: 600;
  transition: all .15s;
}
.btn svg { margin-right: 4px; }
.buttons.center { justify-content: center; }
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

/* Social icons */
.social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.social.center { justify-content: center; }
.social a {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted); font-size: 1.15rem;
  transition: all .18s;
}
.social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-3px); }

/* Sections */
.section { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
h2 { font-size: 1.8rem; margin-bottom: 22px; }
h3 { font-size: 1.1rem; margin-bottom: 6px; }
.section p { margin-bottom: 14px; max-width: 720px; }
.sub { color: var(--muted); margin-top: -10px; }
.motto { color: var(--accent); font-weight: 600; font-style: italic; }
.muted { color: var(--muted); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 32px; }
.stats div { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-align: center; }
.stats b { display: block; font-size: 2rem; color: var(--accent); line-height: 1.2; }
.stats span { font-size: .85rem; color: var(--muted); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
  background: var(--soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px;
  display: flex; flex-direction: column;
}
.card.reveal.in { transition: transform .18s, box-shadow .18s, opacity .6s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(28,36,48,.09); }
.card p { font-size: .95rem; color: var(--muted); flex-grow: 1; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tags li {
  font-size: .78rem; padding: 3px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--text);
  transition: all .15s;
}
.tags li:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.card-link { margin-top: 12px; font-size: .9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.card-link svg, .more svg { transition: transform .15s; }
.card-link:hover svg, .more a:hover svg { transform: translateX(4px); }
.more { margin-top: 24px; }

/* Achievements */
.achievements { display: grid; gap: 24px; }
.achv {
  display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center;
  background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
}
.achv:nth-child(even) { grid-template-columns: 1fr 300px; }
.achv:nth-child(even) .photo { order: 2; }
.photo {
  border: 0; padding: 0; background: none; cursor: zoom-in;
  border-radius: 10px; overflow: hidden; display: block;
}
.photo img { width: 100%; height: 260px; object-fit: cover; object-position: center top; display: block; transition: transform .4s; }
.photo:hover img { transform: scale(1.05); }
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: #e8efff; color: var(--accent); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.achv h3 { font-size: 1.25rem; }
.achv p { color: var(--muted); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.skills h3 { margin-bottom: 10px; }

/* Education */
.edu { margin-bottom: 4px; }

/* Certificates */
.certs { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.cert-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cert-ico { font-size: 1.5rem; color: var(--accent); }
.date { font-size: .8rem; color: var(--muted); }
.issuer { font-weight: 600; color: var(--text) !important; flex-grow: 0 !important; margin-bottom: 14px !important; }
.verify {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 8px;
  background: #fff; border: 1px solid var(--line);
  transition: all .15s;
}
.verify:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Contact */
.contact { text-align: center; }
.contact p { margin-left: auto; margin-right: auto; }

footer {
  border-top: 1px solid var(--line); padding: 24px 0;
  text-align: center; color: var(--muted); font-size: .9rem;
}

/* Back to top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px;
  border-radius: 50%; border: 0; background: var(--accent); color: #fff;
  font-size: 1.2rem; cursor: pointer; box-shadow: 0 6px 16px rgba(37,87,214,.35);
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .25s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--accent-dark); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(10,14,22,.88);
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
  animation: fade .2s;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lb-close { position: absolute; top: 14px; right: 20px; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Mobile */
@media (max-width: 760px) {
  .hero { flex-direction: column; text-align: center; gap: 28px; padding-top: 44px; padding-bottom: 44px; }
  .avatar { width: 200px; height: 200px; }
  h1 { font-size: 2.2rem; }
  .lead { margin-left: auto; margin-right: auto; }
  .buttons, .social { justify-content: center; }
  .nav nav { display: none; }
  .burger { display: flex; }
  .achv, .achv:nth-child(even) { grid-template-columns: 1fr; }
  .achv:nth-child(even) .photo { order: 0; }
  .photo img { height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .avatar-wrap, .cursor { animation: none; }
}

/* Social icons: brand colours */
.social a[aria-label="GitHub"]    { --b: #181717; }
.social a[aria-label="LinkedIn"]  { --b: #0a66c2; }
.social a[aria-label="Instagram"] { --b: #e4405f; }
.social a[aria-label="Facebook"]  { --b: #1877f2; }
.social a[aria-label="X"]         { --b: #000000; }
.social a[aria-label="Email"]     { --b: #ea4335; }
.social a[aria-label] { color: var(--b); border-color: var(--line); }
.social a[aria-label]:hover { background: var(--b); border-color: var(--b); color: #fff; }
.social a[aria-label="Instagram"]:hover { background: linear-gradient(45deg, #f09433, #dc2743 55%, #bc1888); border-color: transparent; }

/* In the blue mobile menu: white circles with brand-coloured icons */
.mm-foot .social a[aria-label] { background: #fff; border-color: #fff; color: var(--b); }
.mm-foot .social a[aria-label]:hover { background: #fff; color: var(--b); transform: translateY(-3px); }

/* WhatsApp */
.social a[aria-label="WhatsApp"] { --b: #25d366; }
.btn.wa { color: #128c7e; border-color: #bfe9d4; }
.btn.wa:hover { background: #25d366; border-color: #25d366; color: #fff; }