/* ===========================================================================
   Portfolio "Nova" theme — teal-on-navy with an animated constellation
   (particle-network) background. Sticky nav, avatar hero with typewriter,
   scrolling sections. Original CSS/canvas recreation; data-driven.
   =========================================================================== */

:root {
    --nv-bg: #0a1622;
    --nv-bg-2: #0d1b2a;
    --nv-surface: rgba(255,255,255,.03);
    --nv-surface-2: rgba(255,255,255,.05);
    --nv-border: rgba(45,212,191,.16);
    --nv-ink: #e9f5f2;
    --nv-dim: #93a7b5;
    --nv-faint: #607585;
    --nv-teal: #2dd4bf;
    --nv-teal-2: #14b8a6;
    --nv-blue: #38bdf8;
    --nv-radius: 16px;
    --nv-max: 1180px;
    --nv-font: 'Inter', system-ui, -apple-system, sans-serif;
    --nv-display: 'Poppins', 'Inter', sans-serif;
    --nv-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--nv-font); color: var(--nv-dim); background: var(--nv-bg); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1,h2,h3,h4 { color: var(--nv-ink); font-family: var(--nv-display); }

#nv-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nv-wrap { max-width: var(--nv-max); margin: 0 auto; padding: 0 30px; position: relative; z-index: 1; }
.nv-section { padding: 90px 0; position: relative; z-index: 1; }
.nv-title { text-align: center; font-size: clamp(2rem,4.6vw,3.2rem); font-weight: 800; margin: 0 0 14px; }
.nv-title .g { color: var(--nv-teal); }
.nv-rule { width: 80px; height: 4px; border-radius: 4px; background: var(--nv-teal); margin: 0 auto 18px; }
.nv-lead { text-align: center; color: var(--nv-dim); max-width: 70ch; margin: 0 auto 46px; font-size: 1.05rem; }
.nv-lead b { color: var(--nv-ink); }

/* ---- Nav ---- */
.nv-nav { position: sticky; top: 0; z-index: 50; background: rgba(10,22,34,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--nv-border); }
.nv-nav-in { max-width: var(--nv-max); margin: 0 auto; padding: 18px 30px; display: flex; align-items: center; justify-content: space-between; }
.nv-brand { font-family: var(--nv-mono); font-weight: 700; color: var(--nv-teal); font-size: 1.15rem; }
.nv-links { display: flex; gap: 26px; }
.nv-links a { color: var(--nv-dim); font-size: .95rem; font-weight: 500; padding: 4px 0; position: relative; transition: color .2s; }
.nv-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--nv-teal); transform: scaleX(0); transition: transform .2s; }
.nv-links a:hover, .nv-links a.on { color: var(--nv-teal); }
.nv-links a.on::after { transform: scaleX(1); }
.nv-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nv-burger span { width: 24px; height: 2px; background: var(--nv-ink); border-radius: 2px; }

/* ---- Hero ---- */
.nv-hero { min-height: 92vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 30px; }
.nv-avatar-ring { width: 220px; height: 220px; border-radius: 50%; padding: 6px; background: conic-gradient(from 0deg, var(--nv-teal), var(--nv-blue), var(--nv-teal)); position: relative; margin-bottom: 40px; }
.nv-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--nv-bg); background: var(--nv-bg-2); }
.nv-avatar.ph { display: flex; align-items: center; justify-content: center; font-family: var(--nv-display); font-weight: 800; font-size: 3.6rem; color: var(--nv-teal); }
.nv-avatar-dot { position: absolute; bottom: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--nv-teal); border: 4px solid var(--nv-bg); }
.nv-hero h1 { font-family: var(--nv-display); font-weight: 800; font-size: clamp(2.6rem,6.5vw,4.6rem); margin: 0 0 18px; color: #fff; }
.nv-hero h1 .g { color: var(--nv-teal); }
.nv-type { font-size: clamp(1.3rem,3vw,2rem); font-weight: 600; color: var(--nv-ink); margin-bottom: 26px; }
.nv-type .a { color: var(--nv-faint); }
.nv-type .t { color: var(--nv-teal); }
.nv-type .cur { color: var(--nv-teal); animation: nvBlink 1s step-end infinite; }
@keyframes nvBlink { 50% { opacity: 0; } }
.nv-quote { font-style: italic; color: var(--nv-faint); max-width: 50ch; margin: 0 auto 18px; }
.nv-loc { color: var(--nv-dim); font-size: .95rem; margin-bottom: 32px; }
.nv-loc svg { width: 15px; height: 15px; vertical-align: -2px; color: var(--nv-teal); }
.nv-card-meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.nv-btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; padding: 14px 30px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; transition: all .2s; }
.nv-btn-teal { background: var(--nv-teal); color: #04201c; box-shadow: 0 12px 30px -10px var(--nv-teal); }
.nv-btn-teal:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px var(--nv-teal); }
.nv-btn-ghost { background: var(--nv-surface); color: var(--nv-ink); border-color: var(--nv-border); }

/* ---- About ---- */
.nv-about-ic { width: 86px; height: 86px; border-radius: 18px; background: linear-gradient(135deg, rgba(45,212,191,.18), rgba(20,184,166,.06)); color: var(--nv-teal); display: flex; align-items: center; justify-content: center; margin: 0 auto 36px; }
.nv-about-ic svg { width: 38px; height: 38px; }
.nv-about p { color: var(--nv-dim); font-size: 1.08rem; text-align: center; max-width: 70ch; margin: 0 auto 18px; }
.nv-about b { color: var(--nv-ink); }

/* ---- Cards (experience / education) ---- */
.nv-card { border: 1px solid var(--nv-border); border-radius: 18px; padding: 30px 34px; background: var(--nv-surface); margin-bottom: 22px; transition: border-color .2s, box-shadow .2s; }
.nv-card:hover { border-color: rgba(45,212,191,.4); box-shadow: 0 20px 50px -30px var(--nv-teal); }
.nv-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.nv-card-role { color: var(--nv-teal); font-size: 1.3rem; font-weight: 700; margin: 0; }
.nv-card-org { color: var(--nv-teal-2); font-weight: 600; margin-top: 4px; }
.nv-card-meta { text-align: right; color: var(--nv-faint); font-size: .9rem; }
.nv-card-meta .pill { display: inline-block; margin-top: 8px; padding: 4px 13px; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--nv-teal); background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.3); }
.nv-card-meta .pill.blue { color: var(--nv-blue); background: rgba(56,189,248,.12); border-color: rgba(56,189,248,.3); }
.nv-card-desc { color: var(--nv-dim); margin: 18px 0 0; }
.nv-keyh { color: var(--nv-teal); font-weight: 600; font-size: .95rem; margin: 18px 0 10px; }
.nv-dots { list-style: none; margin: 0; padding: 0; }
.nv-dots li { position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--nv-dim); font-size: .96rem; }
.nv-dots li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--nv-teal); }
.nv-card-icon { width: 50px; height: 50px; border-radius: 13px; background: rgba(45,212,191,.12); color: var(--nv-teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nv-card-icon svg { width: 24px; height: 24px; }
.nv-card-h { display: flex; gap: 16px; align-items: flex-start; }

/* sub-section heading */
.nv-subh { text-align: center; color: var(--nv-teal); font-size: 1.5rem; font-weight: 700; margin: 50px 0 24px; }

/* Certifications / courses grid */
.nv-cert-box { border: 1px solid var(--nv-border); border-radius: 18px; padding: 26px; background: var(--nv-surface); }
.nv-cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px,100%),1fr)); gap: 14px; }
.nv-cert { display: flex; align-items: center; gap: 12px; border: 1px solid var(--nv-border); border-radius: 12px; padding: 16px 18px; background: var(--nv-bg-2); }
.nv-cert .m { color: var(--nv-teal); flex-shrink: 0; }
.nv-cert .m svg { width: 20px; height: 20px; }
.nv-cert span.nm { color: var(--nv-ink); font-size: .95rem; }
.nv-cert.hasimg { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
.nv-cert .ci { height: 130px; overflow: hidden; } .nv-cert .ci img { width: 100%; height: 100%; object-fit: cover; }
.nv-cert .cb { padding: 16px 18px; }

/* ---- Projects ---- */
/* Projects — alternating big showcase (mirrors Codeflow template) */
.nv-projx { display: grid; grid-template-columns: 1.3fr .7fr; gap: 36px; align-items: center; margin-bottom: 60px; }
.nv-projx:nth-child(even) { grid-template-columns: .7fr 1.3fr; }
.nv-projx:nth-child(even) .nv-projx-shot { order: 2; }
.nv-projx-shot { border-radius: 20px; overflow: hidden; border: 1px solid var(--nv-border); background: linear-gradient(135deg,#0c2a26,#0a1a28); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }
.nv-projx-shot img { width: 100%; height: 100%; object-fit: cover; }
.nv-projx-shot .ph { font-family: var(--nv-display); font-size: 3rem; font-weight: 800; color: rgba(45,212,191,.7); }
.nv-projx-info h3 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #fff; font-size: 1.7rem; font-weight: 800; margin: 0 0 14px; border-left: 4px solid var(--nv-teal); padding-left: 12px; }
.nv-checkout { font-size: .78rem; font-weight: 600; padding: 6px 12px; border: 1px solid var(--nv-border); border-radius: 8px; color: var(--nv-ink); white-space: nowrap; }
.nv-checkout:hover { border-color: var(--nv-teal); color: var(--nv-teal); }
.nv-projx-info > p { color: var(--nv-dim); margin: 0 0 16px; }
.nv-plus { list-style: none; margin: 0 0 18px; padding: 0; }
.nv-plus li { position: relative; padding-left: 24px; margin-bottom: 12px; color: var(--nv-dim); font-size: .96rem; }
.nv-plus li::before { content: "✦"; position: absolute; left: 0; color: var(--nv-teal); }
.nv-pill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.nv-ptag { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; padding: 7px 14px; border-radius: 999px; background: var(--nv-surface); border: 1px solid var(--nv-border); color: var(--nv-ink); }

/* ---- Skills (stack cards) ---- */
.nv-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 22px; }
.nv-stack-card { border: 1px solid var(--nv-border); border-radius: 20px; padding: 28px; background: var(--nv-surface); }
.nv-stack-card .sh { text-align: center; margin-bottom: 22px; }
.nv-stack-card .sh .si { width: 56px; height: 56px; border-radius: 14px; background: rgba(45,212,191,.12); color: var(--nv-teal); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.nv-stack-card .sh .si svg { width: 26px; height: 26px; }
.nv-stack-card .sh h3 { color: var(--nv-teal); font-size: 1.15rem; margin: 0; }
.nv-stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nv-stack-item { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px; border: 1px solid var(--nv-border); border-radius: 12px; background: var(--nv-bg-2); transition: transform .18s, border-color .18s; }
.nv-stack-item:hover { transform: translateY(-3px); border-color: rgba(45,212,191,.4); }
.nv-stack-item .ic { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.nv-stack-item .ic img { width: 32px; height: 32px; }
.nv-glyph { display: none; font-family: var(--nv-mono); font-weight: 700; font-size: 1.1rem; color: var(--nv-teal); letter-spacing: -1px; }
.nv-stack-item.noicon .ic img { display: none; }
.nv-stack-item.noicon .nv-glyph { display: block; }
.nv-stack-item span.nm { color: var(--nv-ink); font-size: .9rem; text-align: center; }

/* ---- Contact connect cards ---- */
.nv-connect { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px,100%),1fr)); gap: 22px; }
.nv-conn { border: 1px solid var(--nv-border); border-radius: 18px; padding: 30px; text-align: center; background: var(--nv-surface); }
.nv-conn .ci { width: 64px; height: 64px; border-radius: 16px; background: var(--nv-bg-2); color: var(--nv-blue); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.nv-conn .ci svg { width: 28px; height: 28px; }
.nv-conn h3 { color: var(--nv-teal); font-size: 1.2rem; margin: 0 0 6px; }
.nv-conn .sub { color: var(--nv-dim); font-size: .92rem; margin-bottom: 18px; word-break: break-word; }
.nv-conn .nv-btn-teal { width: 100%; justify-content: center; padding: 12px; }

/* ---- Footer ---- */
.nv-footer { border-top: 1px solid var(--nv-border); padding: 60px 30px; text-align: center; position: relative; z-index: 1; }
.nv-footer .fav { width: 84px; height: 84px; border-radius: 50%; padding: 4px; background: conic-gradient(from 0deg, var(--nv-teal), var(--nv-blue), var(--nv-teal)); margin: 0 auto 16px; }
.nv-footer .fav img, .nv-footer .fav .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--nv-bg-2); display: flex; align-items: center; justify-content: center; color: var(--nv-teal); font-weight: 800; font-family: var(--nv-display); }
.nv-footer .fname { color: #fff; font-weight: 700; font-size: 1.2rem; }
.nv-footer .frole { color: var(--nv-dim); margin-top: 4px; }
.nv-footer .fsocs { display: flex; gap: 20px; justify-content: center; margin: 22px 0; }
.nv-footer .fsocs a { color: var(--nv-faint); transition: color .2s; }
.nv-footer .fsocs a:hover { color: var(--nv-teal); }
.nv-footer .fsocs svg { width: 22px; height: 22px; }
.nv-footer .copy { color: var(--nv-faint); font-size: .85rem; border-top: 1px solid var(--nv-border); padding-top: 22px; max-width: 360px; margin: 22px auto 0; }
.nv-footer .copy a { color: var(--nv-teal); }

/* back to top */
.nv-top { position: fixed; right: 24px; bottom: 26px; z-index: 40; width: 46px; height: 46px; border-radius: 12px; background: var(--nv-teal); color: #04201c; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px -8px var(--nv-teal); }

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

/* Responsive */
@media (max-width: 820px) {
    .nv-links { display: none; }
    .nv-burger { display: flex; }
    .nv-links.show { display: flex; position: absolute; top: 100%; right: 30px; left: 30px; flex-direction: column; gap: 8px; background: var(--nv-bg-2); border: 1px solid var(--nv-border); border-radius: 14px; padding: 14px; }
    .nv-stack-grid { grid-template-columns: 1fr; }
    .nv-card-meta { text-align: left; }
    .nv-projx, .nv-projx:nth-child(even) { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
    .nv-projx:nth-child(even) .nv-projx-shot { order: 0; }
}
@media (max-width: 520px) { .nv-wrap, .nv-nav-in { padding-left: 18px; padding-right: 18px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .nv-reveal { opacity: 1; transform: none; } * { animation: none !important; transition: none !important; } }
