/* ==========================================================================
   Neeraj Kumar — blog design system
   ========================================================================== */
:root {
  --bg: #f8f9fc;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --text: #1b2033;
  --text-soft: #4b5470;
  --muted: #7a839f;
  --border: #e4e7f1;
  --brand: #4f46e5;
  --brand-2: #0891b2;
  --brand-soft: rgba(79, 70, 229, .09);
  --grad: linear-gradient(120deg, #4f46e5 0%, #7c3aed 45%, #0891b2 100%);
  --shadow-sm: 0 1px 2px rgba(20, 24, 50, .06), 0 1px 3px rgba(20, 24, 50, .05);
  --shadow: 0 10px 30px -10px rgba(30, 36, 80, .18), 0 4px 10px -4px rgba(30, 36, 80, .08);
  --shadow-lg: 0 30px 60px -20px rgba(30, 36, 80, .35);
  --radius: 18px;
  --radius-sm: 10px;
  --code-bg: #f4f5fb;
  --nav-bg: rgba(248, 249, 252, .8);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --maxw: 1180px;
  --readw: 740px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0e1a;
  --surface: #131830;
  --surface-2: #1a2040;
  --text: #e8ebf7;
  --text-soft: #b4bbd6;
  --muted: #8089ab;
  --border: #252c4d;
  --brand: #8b93ff;
  --brand-2: #22d3ee;
  --brand-soft: rgba(139, 147, 255, .12);
  --grad: linear-gradient(120deg, #818cf8 0%, #a78bfa 45%, #22d3ee 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 14px 34px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .8);
  --code-bg: #0f1428;
  --nav-bg: rgba(11, 14, 26, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.7 var(--font); -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
  display: flex; flex-direction: column; min-height: 100vh;
}
body::before { /* ambient glow */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(99, 102, 241, .13), transparent 60%),
    radial-gradient(700px 420px at -5% 10%, rgba(8, 145, 178, .10), transparent 60%);
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-2); }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 999; }
.skip:focus { left: 8px; color: #fff; }
main { flex: 1; }

/* progress bar */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 200; }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 100; backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); background: var(--nav-bg); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font: 700 1.15rem var(--font-display); letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a.link { display: block; padding: 8px 14px; border-radius: 999px; color: var(--text-soft); font-size: .95rem; font-weight: 500; }
.nav-links a.link:hover { color: var(--text); background: var(--brand-soft); }
.nav-links a.link.active { color: var(--brand); background: var(--brand-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); cursor: pointer; font-size: 1rem; transition: all .2s; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-1px); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.menu-toggle { display: none; }
.theme-dark-icon { display: none; }
:root[data-theme="dark"] .theme-light-icon { display: none; }
:root[data-theme="dark"] .theme-dark-icon { display: inline; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .nav-inner { gap: 12px; }
  .nav-actions { margin-left: auto; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; margin: 0; padding: 12px 24px 20px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none; }
  .nav-links.open { display: flex; }
}

/* ---------- Search overlay ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(8, 10, 24, .6); backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; padding: 12vh 20px 20px; }
.search-overlay.open { display: flex; }
.search-box { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.search-box .field { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 1.1rem var(--font); }
.search-box kbd { font: .75rem var(--font-mono); padding: 2px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); }
.search-results { max-height: 50vh; overflow: auto; padding: 8px; }
.search-results a { display: block; padding: 12px 14px; border-radius: var(--radius-sm); color: var(--text); }
.search-results a:hover, .search-results a:focus { background: var(--brand-soft); }
.search-results strong { display: block; font-family: var(--font-display); }
.search-results span { color: var(--muted); font-size: .88rem; display: block; margin-top: 2px; }
.search-empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- Buttons / chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px; border-radius: 999px; font: 600 .95rem var(--font); border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -8px rgba(79, 70, 229, .6); }
.btn-primary:hover { color: #fff; box-shadow: 0 16px 30px -8px rgba(79, 70, 229, .7); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { color: var(--brand); border-color: var(--brand); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font: 600 .78rem var(--font); letter-spacing: .02em; }
a.chip:hover { background: var(--brand); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 56px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font: 600 .82rem var(--font); color: var(--text-soft); }
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); margin-left: 6px; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); font-weight: 700; margin: 22px 0 18px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.2rem; color: var(--text-soft); max-width: 600px; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-social { display: flex; gap: 10px; margin-top: 30px; }
.hero-visual { position: relative; justify-self: center; width: min(100%, 360px); aspect-ratio: 1; }
.hero-visual::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: conic-gradient(from 0deg, #4f46e5, #0891b2, #a78bfa, #4f46e5); filter: blur(26px); opacity: .45; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-visual img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 6px solid var(--surface); box-shadow: var(--shadow-lg); }
.float-badge { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); font: 600 .85rem var(--font); animation: bob 5s ease-in-out infinite; }
.float-badge i { color: var(--brand); }
.float-badge.b1 { left: -28px; top: 14%; }
.float-badge.b2 { right: -24px; bottom: 16%; animation-delay: -2.5s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font: 700 2.1rem var(--font-display); letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-cta, .hero-social { justify-content: center; }
  .hero-visual { order: -1; width: 240px; }
  .float-badge { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: 1.9rem; margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.kicker { font: 700 .78rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }

/* ---------- Post cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s, border-color .3s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-media img { transform: scale(1.06); }
.card-media.ph { display: grid; place-items: center; background: var(--grad); color: rgba(255, 255, 255, .85); font-size: 2.6rem; }
.card-media .chip { position: absolute; left: 14px; top: 14px; background: rgba(255, 255, 255, .92); color: #4338ca; backdrop-filter: blur(6px); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.card-body h3 { font-size: 1.22rem; margin: 0 0 10px; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--brand); }
.card-body p { color: var(--text-soft); font-size: .95rem; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: .85rem; margin-top: auto; }
.meta i { margin-right: 5px; opacity: .8; }
.meta .avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card.feature { flex-direction: row; min-height: 250px; }
.card.feature .card-media { aspect-ratio: auto; width: 44%; flex: none; }
.card.feature .card-body { padding: 26px; justify-content: center; }
.card.feature h3 { font-size: 1.4rem; }
.badge-featured { display: inline-flex; align-items: center; gap: 6px; font: 700 .72rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: #b45309; background: rgba(245, 158, 11, .15); padding: 4px 10px; border-radius: 999px; width: fit-content; margin-bottom: 12px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } .featured-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } .card.feature { flex-direction: column; } .card.feature .card-media { width: 100%; aspect-ratio: 16/9; } }

/* topics strip */
.topics { display: flex; flex-wrap: wrap; gap: 10px; }
.topic { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .92rem; transition: all .2s; }
.topic small { color: var(--muted); font-weight: 600; background: var(--surface-2); border-radius: 999px; padding: 1px 9px; }
.topic:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* pagination */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 48px 0 8px; }
.pager a, .pager span { min-width: 44px; height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; }
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .current { background: var(--grad); color: #fff; border-color: transparent; }
.pager .disabled { opacity: .4; }

/* page header */
.page-hero { padding: 64px 0 24px; text-align: center; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: 12px; }
.page-hero p { color: var(--text-soft); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }

/* ---------- Post ---------- */
.post-header { padding: 56px 0 32px; text-align: center; max-width: 880px; margin: 0 auto; }
.post-header h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); margin: 18px 0 20px; }
.post-header .meta { justify-content: center; font-size: .92rem; }
.post-cover { max-width: 1000px; margin: 0 auto 48px; padding: 0 24px; }
.post-cover figure { margin: 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface-2); text-align: center; border: 1px solid var(--border); }
.post-cover img { display: block; width: 100%; max-height: 380px; object-fit: contain; margin: 0 auto; cursor: zoom-in; }
.post-layout { display: grid; grid-template-columns: 56px minmax(0, var(--readw)) 1fr; gap: 32px; max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.share { position: sticky; top: 110px; align-self: start; display: flex; flex-direction: column; gap: 10px; }
.share .icon-btn { width: 44px; height: 44px; }
.prose { font-size: 1.1rem; line-height: 1.85; color: var(--text); min-width: 0; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1.4em; }
.prose h2 { font-size: 1.85rem; margin: 2em 0 .6em; }
.prose h3 { font-size: 1.45rem; margin: 1.8em 0 .5em; }
.prose h3 + hr, .prose h4 + hr { display: none; }
.prose h4 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose img { border-radius: 12px; box-shadow: var(--shadow); cursor: zoom-in; display: block; margin: 1.6em auto; }
.prose blockquote { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 14px 22px; border-radius: 0 12px 12px 0; color: var(--text-soft); }
.prose blockquote p:last-child { margin: 0; }
.prose :not(pre) > code { font: .86em var(--font-mono); background: var(--code-bg); border: 1px solid var(--border); padding: .15em .45em; border-radius: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); }
.prose .row { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.prose .col-md-6 { flex: 1 1 280px; }
.img-responsive, .img-fluid { max-width: 100%; height: auto; }
.highlight { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--code-bg) !important; box-shadow: var(--shadow-sm); margin: 0 0 1.4em; position: relative; }
.highlight pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: .88rem/1.65 var(--font-mono); background: transparent !important; }
.highlight code { font-family: inherit; }
.highlight table { border-collapse: collapse; width: 100%; display: table; margin: 0; }
.highlight td { border: 0; padding: 0; vertical-align: top; }
.highlight td.rouge-gutter { width: 1%; user-select: none; background: color-mix(in srgb, var(--text) 5%, transparent); }
.highlight td.rouge-gutter pre { color: var(--muted); text-align: right; padding-right: 12px; }
.copy-btn { position: absolute; top: 8px; right: 8px; z-index: 2; opacity: 0; font: 600 .72rem var(--font); padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); cursor: pointer; transition: opacity .2s; }
.highlight:hover .copy-btn, .copy-btn:focus { opacity: 1; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--border); }
.author-card { display: flex; gap: 22px; align-items: center; margin: 40px 0; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.author-card img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand); }
.author-card h4 { margin: 0 0 4px; }
.author-card p { margin: 0 0 10px; color: var(--text-soft); font-size: .95rem; line-height: 1.55; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 40px; }
.post-nav a { display: block; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); transition: all .25s; }
.post-nav a:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
.post-nav small { display: block; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; margin-bottom: 4px; }
.post-nav strong { font-family: var(--font-display); line-height: 1.3; display: block; }
.post-nav .next { text-align: right; }
.comments { margin-bottom: 64px; }
@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; }
  .share { position: static; flex-direction: row; order: 2; }
  .post-nav { grid-template-columns: 1fr; }
  .author-card { flex-direction: column; text-align: center; }
}

/* ---------- Lists (categories / tags / archive) ---------- */
.group { margin-bottom: 44px; }
.group h2 { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.group h2 small { font: 600 .8rem var(--font); color: var(--muted); background: var(--surface-2); padding: 3px 11px; border-radius: 999px; }
.row-list { list-style: none; padding: 0; margin: 0; }
.row-list li a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: 12px; color: var(--text); font-weight: 600; font-family: var(--font-display); }
.row-list li a:hover { background: var(--brand-soft); color: var(--brand); }
.row-list time { color: var(--muted); font: 500 .85rem var(--font); white-space: nowrap; align-self: center; }

/* ---------- About ---------- */
.about-hero { padding: 64px 0 20px; }
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.about-photo { position: relative; }
.about-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 30px; box-shadow: var(--shadow-lg); border: 6px solid var(--surface); transform: rotate(-3deg); transition: transform .4s; }
.about-photo:hover img { transform: rotate(0); }
.about-photo::after { content: ""; position: absolute; inset: 18px -16px -16px 18px; background: var(--grad); border-radius: 30px; z-index: -1; opacity: .5; }
.about-intro h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin: 10px 0 18px; }
.about-intro p { color: var(--text-soft); font-size: 1.1rem; margin: 0 0 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; text-align: center; } .about-photo { max-width: 280px; margin: 0 auto 20px; } .tag-row, .about-intro .hero-cta { justify-content: center; } }

.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.skill { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; font-weight: 600; transition: all .25s; }
.skill:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand); }
.skill i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 1.15rem; }

.timeline { position: relative; margin: 0; padding: 0 0 0 34px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--brand), var(--brand-2), transparent); }
.timeline li { position: relative; margin-bottom: 18px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); transition: all .25s; }
.timeline li:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.timeline li::before { content: ""; position: absolute; left: -33px; top: 28px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.timeline li.now::before { background: #22c55e; border-color: #22c55e; box-shadow: 0 0 0 5px rgba(34, 197, 94, .2); }
.timeline h4 { margin: 0; font-size: 1.1rem; }
.timeline .role { color: var(--text-soft); margin: 2px 0 0; font-size: .95rem; }
.timeline time { display: inline-block; margin-top: 8px; font: 600 .8rem var(--font); color: var(--brand); background: var(--brand-soft); padding: 3px 12px; border-radius: 999px; }
.edu { display: flex; gap: 20px; align-items: center; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); }
.edu i { font-size: 1.6rem; width: 62px; height: 62px; display: grid; place-items: center; background: var(--grad); color: #fff; border-radius: 16px; flex: none; }
.edu h4 { margin: 0 0 2px; }
.edu p { margin: 0; color: var(--text-soft); }

.repos { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.repo { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; transition: all .25s; color: var(--text); }
.repo:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--brand); color: var(--text); }
.repo h4 { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 1rem var(--font-mono); letter-spacing: 0; }
.repo h4 i { color: var(--brand); }
.repo p { margin: 0; color: var(--text-soft); font-size: .92rem; line-height: 1.55; flex: 1; }
.repo .links { display: flex; gap: 14px; font-size: .85rem; font-weight: 600; }
.repo .links span { color: var(--brand); }

.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.award { display: flex; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; transition: all .25s; }
.award:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.award i { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: rgba(245, 158, 11, .15); color: #d97706; font-size: 1.2rem; }
.award p { margin: 0; color: var(--text-soft); font-size: .95rem; line-height: 1.55; }

/* Talk gallery / carousel */
.talk { background: linear-gradient(135deg, #0f172a, #312e81 60%, #0e7490); border-radius: 28px; padding: 44px; color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.talk::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -140px; background: radial-gradient(circle, rgba(34, 211, 238, .35), transparent 65%); }
.talk-head { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 28px; }
.talk-head h2 { color: #fff; margin: 6px 0 6px; font-size: 1.9rem; }
.talk-head p { margin: 0; color: #c7d2fe; max-width: 560px; }
.talk .kicker { color: #67e8f9; }
.talk .btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); backdrop-filter: blur(6px); }
.talk .btn-ghost:hover { background: #fff; color: #312e81; }
.gallery-swiper { position: relative; border-radius: 20px; --swiper-theme-color: #fff; --swiper-navigation-size: 20px; }
.gallery-swiper .swiper-slide { height: auto; }
.shot { position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 3 / 2; background: #0b1020; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .6); cursor: zoom-in; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.shot:hover img { transform: scale(1.07); }
.shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8, 10, 30, .85)); }
.shot .cap { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 16px; color: #fff; font-weight: 600; line-height: 1.35; }
.shot .cap small { display: block; font-weight: 500; color: #c7d2fe; margin-top: 2px; }
.shot .zoom-hint { position: absolute; z-index: 2; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); color: #fff; opacity: 0; transform: scale(.8); transition: all .3s; }
.shot:hover .zoom-hint { opacity: 1; transform: none; }
.gallery-swiper .swiper-button-next, .gallery-swiper .swiper-button-prev { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .3); }
.gallery-swiper .swiper-button-next::after, .gallery-swiper .swiper-button-prev::after { font-size: 16px; font-weight: 800; }
.gallery-swiper .swiper-pagination { position: static; margin-top: 20px; }
.gallery-swiper .swiper-pagination-bullet { background: #fff; opacity: .4; width: 9px; height: 9px; }
.gallery-swiper .swiper-pagination-bullet-active { opacity: 1; width: 28px; border-radius: 6px; }
.deck { position: relative; margin-top: 30px; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 16 / 10; max-width: 860px; margin-inline: auto; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .6); }
.deck iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) { .talk { padding: 26px 18px; border-radius: 22px; } }

/* support */
.support { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px 36px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.support h3 { margin: 0 0 4px; }
.support p { margin: 0; color: var(--text-soft); }

/* ---------- Footer ---------- */
.footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 52px 0 36px; }
.footer h5 { font: 700 .78rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.footer p { color: var(--text-soft); margin: 10px 0 0; font-size: .95rem; max-width: 380px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--text-soft); font-size: .95rem; }
.footer ul a:hover { color: var(--brand); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px 0 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.socials { display: flex; gap: 10px; }
.to-top { position: fixed; right: 24px; bottom: 24px; opacity: 0; pointer-events: none; transform: translateY(10px); z-index: 90; background: var(--grad); color: #fff; border: 0; box-shadow: var(--shadow); }
.to-top:hover { color: #fff; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* lightbox polish */
.glightbox-container .gslide-description { background: transparent; }
.glightbox-clean .gdesc-inner { padding: 14px 20px; }
.glightbox-clean .gslide-title { font-family: var(--font-display); }

.card.feature .card-media img { object-fit: contain; padding: 14px; }
