/* =========================================================================
   Vijay Jawali — Portfolio
   site.css · Lightweight, light-first design system (no jQuery / no template)
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Light theme (default) */
  --bg: #f7f8fb;
  --bg-2: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --border: #e4e8f0;
  --border-strong: #d3d9e6;
  --text: #1a2233;
  --text-soft: #47536b;
  --muted: #7a8699;
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --accent-soft: #eef0ff;
  --accent-ring: rgba(79, 70, 229, 0.28);
  --good: #16a34a;
  --shadow-sm: 0 1px 2px rgba(20, 30, 55, 0.06);
  --shadow: 0 6px 22px rgba(20, 30, 55, 0.08);
  --shadow-lg: 0 18px 48px rgba(20, 30, 55, 0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --maxw: 1120px;
  --nav-h: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --bg: #0c0f17;
  --bg-2: #0f1420;
  --surface: #141a26;
  --surface-2: #1a2130;
  --border: #232c3d;
  --border-strong: #2f3a4f;
  --text: #eef2f9;
  --text-soft: #b7c1d4;
  --muted: #7f8ba1;
  --accent: #818cf8;
  --accent-2: #38bdf8;
  --accent-soft: #1c2233;
  --accent-ring: rgba(129, 140, 248, 0.32);
  --good: #4ade80;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f17;
    --bg-2: #0f1420;
    --surface: #141a26;
    --surface-2: #1a2130;
    --border: #232c3d;
    --border-strong: #2f3a4f;
    --text: #eef2f9;
    --text-soft: #b7c1d4;
    --muted: #7f8ba1;
    --accent: #818cf8;
    --accent-2: #38bdf8;
    --accent-soft: #1c2233;
    --accent-ring: rgba(129, 140, 248, 0.32);
    --good: #4ade80;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; color: var(--text); margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1rem; color: var(--text-soft); }
ul { color: var(--text-soft); }
blockquote { margin: 0; }
hr { border: 0; height: 1px; background: var(--border); margin: 2.5rem 0; }
::selection { background: var(--accent-ring); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.section-head { margin-bottom: 34px; }
.section-head .eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .5rem; font-weight: 600; display: inline-flex; align-items: center; gap: .5rem;
}
.section-head .eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
.lead { font-size: 1.08rem; color: var(--text-soft); max-width: 62ch; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---------- Top navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.nav.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; letter-spacing: .02em; font-size: 1.05rem; color: var(--text); }
.brand-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex: none; box-shadow: var(--shadow-sm); }
.brand strong { color: var(--text); font-weight: 800; }
.brand span { color: var(--accent); font-weight: 600; }
.brand .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: 2px; box-shadow: 0 0 0 4px var(--accent-ring); }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-soft);
  font-size: .92rem; font-weight: 500; transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); display: inline-grid; place-items: center;
  cursor: pointer; transition: all .18s ease; font-size: 1rem;
}
.icon-btn:hover { color: var(--accent); border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .sun { display: inline; } :root:not([data-theme="light"]) .theme-toggle .moon { display: none; } }

.nav-toggle { display: none; }
@media (max-width: 1080px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 14px 18px 20px;
    box-shadow: var(--shadow); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all .22s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
  .nav-toggle { display: inline-grid; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  padding: 11px 20px; border-radius: 11px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: all .18s ease; line-height: 1; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px var(--accent-ring); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); color: #fff; box-shadow: 0 12px 26px var(--accent-ring); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--border-strong); color: var(--accent); box-shadow: var(--shadow); }
.btn-line { background: transparent; color: var(--text-soft); border-color: var(--border); }
.btn-line:hover { color: var(--accent); border-color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 9px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 104px) 0 64px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: -1;
  background:
    radial-gradient(600px 320px at 18% 12%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(560px 300px at 82% 8%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 72%);
  filter: blur(4px); opacity: .7; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 44px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.availability {
  display: inline-flex; align-items: center; gap: .55rem; font-size: .82rem; font-weight: 600;
  color: var(--text-soft); background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.availability .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { margin-bottom: 14px; }
.hero h1 .grad { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.role-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 20px; }
.role-pills a, .pill {
  font-family: var(--mono); font-size: .84rem; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); padding: 7px 15px; border-radius: 999px;
  box-shadow: var(--shadow-sm); transition: all .18s ease;
}
.role-pills a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Terminal-style kicker + flipping role */
.hero-kicker { font-family: var(--mono); font-size: .9rem; letter-spacing: .03em; color: var(--accent); margin: 0 0 16px; }
.hero-kicker .prompt { color: var(--muted); }
.hero-kicker .caret { display: inline-block; width: .55em; height: 1.05em; background: var(--accent); vertical-align: -0.18em; margin-left: 3px; border-radius: 1px; animation: blink 1.1s steps(1) infinite; }
.hero-role { font-size: clamp(1.1rem, 2.5vw, 1.45rem); font-weight: 600; color: var(--text-soft); margin: 6px 0 22px; display: inline-flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.flip { display: inline-block; height: 1.5em; line-height: 1.5em; overflow: hidden; vertical-align: bottom; }
.flip-list { display: flex; flex-direction: column; animation: role-flip 5s cubic-bezier(.72,0,.28,1) infinite; }
.flip-list > span { height: 1.5em; line-height: 1.5em; font-weight: 800; white-space: nowrap; background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@keyframes role-flip { 0%, 42% { transform: translateY(0); } 50%, 92% { transform: translateY(-1.5em); } 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .flip-list { animation: none; } .hero-kicker .caret { animation: none; } }

.typeline { min-height: 2.8em; font-size: 1.06rem; color: var(--text-soft); max-width: 56ch; margin: 0 0 26px; }
.typeline .cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); margin-left: 2px; vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-lg); position: relative;
}
.hero-card .card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.hero-card .card-top .d { width: 11px; height: 11px; border-radius: 50%; }
.hero-card .card-top .d1 { background: #ff5f57; } .hero-card .card-top .d2 { background: #febc2e; } .hero-card .card-top .d3 { background: #28c840; }
.hero-card .card-top .fname { margin-left: auto; font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.hero-code { font-family: var(--mono); font-size: .84rem; line-height: 1.9; color: var(--text-soft); margin: 0; white-space: pre-wrap; }
.hero-code .k { color: var(--accent); } .hero-code .s { color: var(--accent-2); } .hero-code .c { color: var(--muted); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }

/* Section tile (home) */
.tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; min-height: 150px; }
.tile .tile-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.15rem; margin-bottom: 12px; }
.tile h3 { margin: 0 0 4px; color: var(--text); }
.tile h3 a { color: inherit; }
.tile .tile-sub { font-size: .88rem; color: var(--muted); min-height: 2.6em; margin: 0; }
.tile .arrow { margin-top: auto; color: var(--accent); font-weight: 600; font-size: .85rem; display: inline-flex; align-items: center; gap: .3rem; transition: gap .18s ease; }
.tile:hover .arrow { gap: .6rem; }

/* ---------- Page header (interior pages) ---------- */
.page-hero { padding: 56px 0 22px; position: relative; }
.page-hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 280px; z-index: -1;
  background: radial-gradient(520px 240px at 20% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.crumb { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--accent); }
.page-quote { font-style: italic; color: var(--text-soft); border-left: 3px solid var(--accent); padding-left: 16px; margin-top: 14px; max-width: 60ch; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 8px 0; }
/* connector segment from each dot to the next one (centered on the dot, stops at the last dot) */
.tl-item:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 24px; bottom: -22px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 8px 46px; margin-bottom: 14px; display: block; text-decoration: none; }
.tl-item::before {
  content: ""; position: absolute; left: 8px; top: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--bg); transition: transform .18s ease;
}
.tl-item:hover::before { transform: scale(1.18); }
.tl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: all .2s ease; }
.tl-item:hover .tl-card { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateX(3px); }
.tl-date { font-family: var(--mono); font-size: .78rem; color: var(--accent); font-weight: 600; margin: 0 0 4px; letter-spacing: .02em; }
.tl-card h4 { margin: 0 0 2px; }
.tl-card p { margin: 0; color: var(--text-soft); font-size: .95rem; }

/* ---------- Experience detail blocks ---------- */
.xp { scroll-margin-top: calc(var(--nav-h) + 24px); }
.xp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 6px; }
.xp-head h2 { margin: 0; }
.xp-role { font-weight: 600; color: var(--accent); }
.xp-date { font-family: var(--mono); font-size: .82rem; color: var(--muted); margin-left: auto; }
.block-label { font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 22px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.chip {
  display: inline-block; font-size: .82rem; font-weight: 500; color: var(--text-soft);
  background: var(--surface-2); border: 1px solid var(--border); padding: 6px 12px; border-radius: 8px;
  transition: all .16s ease;
}
.chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.achv { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.achv li { position: relative; padding-left: 26px; color: var(--text-soft); }
.achv li::before { content: "★"; position: absolute; left: 0; top: 0; color: var(--accent); font-size: .95rem; }
.resp { margin: 0; padding-left: 20px; }
.resp li { margin-bottom: 8px; }
.resp ul { margin-top: 8px; }
.note { color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-top: 16px; }

/* ---------- Roles nested within a single company ---------- */
.roles { margin-top: 22px; padding-left: 24px; position: relative; }
/* connector segment from each role dot to the next one */
.role-block:not(:last-child)::after { content: ""; position: absolute; left: -18px; top: 36px; bottom: -40px; width: 2px; background: var(--border); }
.role-block { position: relative; scroll-margin-top: calc(var(--nav-h) + 24px); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.role-block:last-child { margin-bottom: 0; }
.role-block::before { content: ""; position: absolute; left: -24px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--surface); }
.role-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 2px; }
.role-head h3 { margin: 0; color: var(--accent); }
.role-head .role-date { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-left: auto; }
.role-block .note { background: var(--surface); }
.role-block .block-label:first-of-type { margin-top: 16px; }
@media (max-width: 560px) { .roles { padding-left: 20px; } .role-block::before { left: -20px; } .role-block:not(:last-child)::after { left: -14px; } }

/* ---------- Spotlight (projects/articles) ---------- */
.spot { display: block; overflow: hidden; padding: 0; }
.spot .spot-img { display: flex; align-items: center; justify-content: center; background: var(--surface-2); padding: 20px; border-bottom: 1px solid var(--border); }
.spot .spot-img img { width: auto; max-width: 100%; height: auto; max-height: 500px; border-radius: 8px; }
.spot .spot-body { padding: 24px; }
.spot .spot-body h3 { margin-bottom: 10px; }
.spot .spot-body p { margin-bottom: 16px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Skills ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 26px; }
.search {
  position: relative; flex: 1 1 260px; min-width: 200px;
}
.search input {
  width: 100%; padding: 11px 14px 11px 40px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font); font-size: .95rem; box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.search .s-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  font-family: var(--font); font-size: .85rem; font-weight: 500; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  transition: all .16s ease;
}
.filter-btn:hover { color: var(--accent); border-color: var(--accent); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 6px 16px var(--accent-ring); }
.count-note { font-size: .85rem; color: var(--muted); margin: 0 0 18px; font-family: var(--mono); }

.skill-group { margin-bottom: 34px; }
.skill-group > h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.skill-group > h3::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); }
.skill-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.skill {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px;
  box-shadow: var(--shadow-sm); transition: all .18s ease;
}
.skill:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.skill .s-name { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .92rem; margin-bottom: 9px; }
.skill .s-lvl { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.bar { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1s cubic-bezier(.2,.7,.2,1); }
.no-results { text-align: center; color: var(--muted); padding: 40px 0; font-family: var(--mono); font-size: .9rem; }

/* ---------- Certifications ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cert {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; transition: all .18s ease;
}
.cert:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.cert h4 { margin: 0; font-size: .98rem; line-height: 1.35; }
.cert .cert-meta { margin: 0; color: var(--muted); font-size: .82rem; font-family: var(--mono); }
.cert .cert-meta p { margin: 0; color: var(--muted); font-size: .82rem; }
.cert .cert-foot { margin-top: auto; padding-top: 8px; }
.year-head { font-family: var(--mono); font-size: 1.35rem; color: var(--text); margin: 34px 0 16px; display: flex; align-items: center; gap: 12px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.year-head::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.year-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }

/* ---------- About / profile ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.prose p { color: var(--text-soft); }
.badge-base { margin: 6px 0 4px; }

/* ---------- Connect on LinkedIn card ---------- */
.li-card { display: inline-flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; margin-top: 16px; max-width: 440px; }
.li-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.li-card .li-ico { width: 44px; height: 44px; border-radius: 11px; background: #0a66c2; color: #fff; display: grid; place-items: center; font-size: 1.25rem; flex: none; }
.li-card .li-body { display: flex; flex-direction: column; line-height: 1.3; }
.li-card .li-name { font-weight: 700; color: var(--text); }
.li-card .li-sub { font-size: .85rem; color: var(--muted); }
.li-card .li-cta { margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; transition: gap .18s ease; }
.li-card:hover .li-cta { gap: .6rem; }
@media (max-width: 520px) { .li-card .li-cta { margin-left: 58px; margin-top: 4px; } }

/* ---------- Contact ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 560px) { .contact-cards { grid-template-columns: 1fr; } }
.contact-card { display: flex; align-items: center; gap: 14px; }
.contact-card .c-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.15rem; flex: none; }
.contact-card h3 { margin: 0 0 2px; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.contact-card a { font-weight: 600; color: var(--text); word-break: break-all; }
.contact-card a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0 44px; margin-top: 40px; background: var(--bg-2); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.social { display: flex; gap: 12px; list-style: none; padding: 0; margin: 0; }
.social a {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); transition: all .18s ease;
}
.social a:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 18px var(--accent-ring); }
.copyright { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: .85rem; }
.copyright a { color: var(--muted); } .copyright a:hover { color: var(--accent); }

/* ---------- Back to top ---------- */
#topButton {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--accent); cursor: pointer;
  font-family: var(--mono); font-size: .68rem; font-weight: 700; letter-spacing: .05em; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: all .25s ease;
}
#topButton.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#topButton:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .bar > span { transition: none; }
  .pulse, .availability .pulse { animation: none; }
}

/* ---------- Utilities ---------- */
.stack-sm > * + * { margin-top: 10px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; list-style: none; padding: 0; margin: 30px 0 0; }
.pagination li { display: inline-flex; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  font-size: .9rem; font-weight: 500; transition: all .16s ease;
}
.pagination a:hover { color: var(--accent); border-color: var(--accent); }
.pagination .page.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled { opacity: .45; cursor: not-allowed; }
.pagination .dots { border: 0; background: transparent; }

/* =========================================================================
   feature/creative — data-pipeline hero, impact metrics, Ask-me widget
   ========================================================================= */


/* ---------- Impact metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.metric { text-align: center; padding: 22px 14px; }
.metric .m-num { display: block; font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.metric .m-label { margin: 9px 0 0; font-size: .86rem; color: var(--text-soft); line-height: 1.35; }

/* ---------- Ask about me ---------- */
.ask-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; max-width: 780px; }
.ask-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ask-head .ask-ico { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.ask-head h3 { margin: 0; font-size: 1.1rem; }
.ask-head p { margin: 2px 0 0; font-size: .84rem; color: var(--muted); }
.ask-row { display: flex; gap: 10px; }
.ask-input { flex: 1; min-width: 0; padding: 12px 15px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--font); font-size: .98rem; transition: border-color .18s ease, box-shadow .18s ease; }
.ask-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.ask-send { flex: none; }
.ask-send[disabled] { opacity: .6; cursor: default; transform: none; }
.ask-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ask-chip { font-family: var(--font); font-size: .83rem; cursor: pointer; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-soft); transition: all .16s ease; }
.ask-chip:hover { color: var(--accent); border-color: var(--accent); }
.ask-answer { margin-top: 16px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); line-height: 1.72; white-space: pre-wrap; display: none; }
.ask-answer.show { display: block; }
.ask-answer .dots::after { content: "…"; animation: askdots 1.2s steps(4) infinite; }
@keyframes askdots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.ask-note { font-size: .77rem; color: var(--muted); margin: 12px 0 0; }

/* ---------- Responsive fixes (mobile / tablet) ---------- */
.nav-contact { display: none; }
.li-card { max-width: min(440px, 100%); }
@media (max-width: 767px) {
  .ask-input, .search input { font-size: 16px; }   /* prevents iOS zoom-on-focus */
}
@media (max-width: 560px) {
  .wrap, .nav-inner { padding-left: 16px; padding-right: 16px; }
  .nav-actions > .btn { display: none; }            /* CONTACT moves into the menu */
  .nav-links .nav-contact { display: block; }
  .brand { font-size: .98rem; gap: .4rem; }
  .brand-logo { width: 28px; height: 28px; }
  .li-card { display: flex; flex-wrap: wrap; width: 100%; }
  .ask-box { padding: 16px; }
  .ask-row { flex-wrap: wrap; }
  .ask-send { width: 100%; justify-content: center; }
  .xp-date, .role-head .role-date { margin-left: 0; }
  #topButton { right: 14px; bottom: 14px; }
}
@media (max-width: 900px) { .metrics > .metric:last-child:nth-child(odd) { grid-column: 1 / -1; } }
