/* ============================================================
   Kumar Kunal — Portfolio design system
   ============================================================ */
/* Default theme: light & graceful — white, light-blue, black */
:root {
  --bg: #f7fbff;
  --bg-soft: #ecf4ff;
  --card: #ffffff;
  --card-2: #f2f8ff;
  --border: #00000000;
  --border-solid: #dbe8fa;
  --text: #0e1726;
  --text-dim: #445067;
  --text-mute: #7b8aa3;
  --accent: #2f80ed;
  --accent-2: #56ccf2;
  --accent-grad: linear-gradient(120deg, #2f80ed, #56ccf2);
  --good: #12b3a0;
  --warn: #e0951c;
  --danger: #e5484d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 34px rgba(47,128,237,.12);
  --maxw: 1080px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Optional dark mode (toggle in the nav) */
:root[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-soft: #111725;
  --card: #151d2c;
  --card-2: #1a2436;
  --border-solid: #263044;
  --text: #e8edf6;
  --text-dim: #9fb0c9;
  --text-mute: #6b7c98;
  --accent: #4f8cff;
  --accent-2: #7cc0ff;
  --accent-grad: linear-gradient(120deg, #4f8cff, #7cc0ff);
  --good: #38d39f;
  --shadow: 0 10px 40px rgba(0,0,0,.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--border-solid);
  background: var(--card); color: var(--text); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn.primary { background: var(--accent-grad); border: none; color: #fff; box-shadow: 0 6px 20px rgba(79,140,255,.35); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.block { width: 100%; justify-content: center; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border-solid);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; letter-spacing: .3px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-grad); }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--text-dim); font-weight: 500; font-size: 14.5px; transition: .15s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-solid);
  background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--text);
}
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 78px 0 60px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% 20% auto auto; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(86,204,242,.30), transparent 62%); filter: blur(24px); z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: auto auto -30% -10%; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(47,128,237,.18), transparent 62%); filter: blur(24px); z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr .9fr; gap: 44px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good);
  font-size: 13px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--good) 30%, transparent);
}
.badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(56,211,159,.6)} 70%{box-shadow:0 0 0 8px rgba(56,211,159,0)} 100%{box-shadow:0 0 0 0 rgba(56,211,159,0)} }
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.08; margin: 18px 0 8px; letter-spacing: -1px; }
.hero h1 .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .role { font-size: clamp(17px, 2.4vw, 22px); color: var(--text-dim); font-weight: 600; }
.hero .tagline { margin-top: 14px; max-width: 560px; color: var(--text-dim); font-size: 16px; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; color: var(--text-mute); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }

.avatar-wrap { position: relative; display: grid; place-items: center; }
.avatar {
  width: 260px; height: 260px; border-radius: 28px; object-fit: cover;
  border: 1px solid var(--border-solid); box-shadow: var(--shadow);
  background: var(--card-2);
}
.avatar.placeholder { display: grid; place-items: center; font-size: 84px; font-weight: 800; color: var(--accent); background: var(--card-2); }
.avatar-ring { position: absolute; inset: -14px; border-radius: 36px; border: 1.5px dashed color-mix(in srgb, var(--accent) 40%, transparent); animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 46px; }
.stat { background: var(--card); border: 1px solid var(--border-solid); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat .v { font-size: 30px; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--text-mute); font-size: 13px; margin-top: 4px; }

/* ---------- Sections ---------- */
section.block { padding: 62px 0; }
.section-head { margin-bottom: 34px; }
.section-head .eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); margin-top: 6px; letter-spacing: -.5px; }
.section-head p { color: var(--text-dim); margin-top: 8px; max-width: 640px; }

/* ---------- About / video ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
.about-card { background: var(--card); border: 1px solid var(--border-solid); border-radius: var(--radius); padding: 28px; }
.about-card p { color: var(--text-dim); }
.video-card { background: var(--card); border: 1px solid var(--border-solid); border-radius: var(--radius); overflow: hidden; }
.video-frame { aspect-ratio: 16/9; width: 100%; background: var(--card-2); border: none; display: grid; place-items: center; color: var(--text-mute); text-align: center; padding: 20px; }
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; }
.video-card .cap { padding: 14px 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* ---------- Skills / tools ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 9px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--border-solid); font-size: 14px; font-weight: 500; color: var(--text-dim); transition: .15s; }
.chip:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.tool { background: var(--card); border: 1px solid var(--border-solid); border-radius: var(--radius-sm); padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.tool .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--card-2); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.tool .n { font-weight: 600; font-size: 14.5px; }
.tool .c { font-size: 12px; color: var(--text-mute); }

/* ---------- Timeline ---------- */
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 6px; bottom: 6px; width: 2px; background: var(--border-solid); }
.tl-item { position: relative; padding: 0 0 30px 48px; }
.tl-item::before { content: ""; position: absolute; left: 7px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.tl-item.current::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.tl-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.tl-role { font-size: 18px; font-weight: 700; }
.tl-co { color: var(--accent); font-weight: 600; }
.tl-date { color: var(--text-mute); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tl-bullets { margin-top: 10px; list-style: none; display: grid; gap: 7px; }
.tl-bullets li { position: relative; padding-left: 18px; color: var(--text-dim); font-size: 14.5px; }
.tl-bullets li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }

/* ---------- Projects ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 18px; }
.proj { background: var(--card); border: 1px solid var(--border-solid); border-radius: var(--radius); padding: 22px; transition: .18s; display: flex; flex-direction: column; }
.proj:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.proj .top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.proj h3 { font-size: 17px; }
.proj .dur { font-size: 12px; color: var(--text-mute); background: var(--card-2); padding: 4px 10px; border-radius: 999px; white-space: nowrap; font-weight: 600; }
.proj ul { list-style: none; margin: 12px 0; display: grid; gap: 6px; }
.proj li { position: relative; padding-left: 16px; color: var(--text-dim); font-size: 13.7px; }
.proj li::before { content: "•"; position: absolute; left: 2px; color: var(--accent); }
.proj .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }

/* ---------- Cert / edu grid ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.list-card { background: var(--card); border: 1px solid var(--border-solid); border-radius: var(--radius); padding: 24px; }
.list-card h3 { margin-bottom: 16px; font-size: 18px; display: flex; gap: 8px; align-items: center; }
.edu-item { padding: 12px 0; border-bottom: 1px solid var(--border-solid); }
.edu-item:last-child { border-bottom: none; }
.edu-item .d { font-weight: 600; }
.edu-item .i { color: var(--text-mute); font-size: 13.5px; }
.cert-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-solid); }
.cert-item:last-child { border-bottom: none; }
.cert-item .ci { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-grad); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-info { display: grid; gap: 14px; }
.ci-row { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border-solid); border-radius: var(--radius-sm); padding: 16px; }
.ci-row .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--card-2); display: grid; place-items: center; font-size: 18px; }
.ci-row .k { font-size: 12px; color: var(--text-mute); }
.ci-row .v { font-weight: 600; }
form.card { background: var(--card); border: 1px solid var(--border-solid); border-radius: var(--radius); padding: 24px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input, textarea, select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-solid);
  background: var(--bg-soft); color: var(--text); font-family: inherit; font-size: 14.5px; transition: .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { resize: vertical; min-height: 110px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border-solid); padding: 34px 0; margin-top: 30px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; color: var(--text-mute); font-size: 14px; }
.social { display: flex; gap: 10px; }

/* ---------- WhatsApp ---------- */
.wa-btn { background: #25d366; border: none; color: #fff; }
.wa-btn:hover { background: #1fb457; border: none; }
.wa-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 150;
  display: flex; align-items: center; gap: 0; overflow: hidden;
  height: 58px; padding: 0; width: 58px; border-radius: 999px;
  background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(37,211,102,.45);
  transition: width .28s ease, background .2s; white-space: nowrap;
}
.wa-fab svg { flex: 0 0 58px; display: grid; place-content: center; padding: 14px; }
.wa-fab .wa-label { font-weight: 700; font-size: 15px; opacity: 0; transition: opacity .2s; padding-right: 4px; }
.wa-fab:hover { width: 168px; background: #1fb457; }
.wa-fab:hover .wa-label { opacity: 1; }
@media (max-width: 560px) { .wa-fab:hover { width: 58px; } .wa-fab .wa-label { display: none; } }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--card); border: 1px solid var(--border-solid); padding: 13px 20px; border-radius: 999px; box-shadow: var(--shadow); z-index: 200; transition: .3s; font-weight: 600; font-size: 14px; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--good); }
.toast.err { border-color: var(--danger); }

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

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .avatar-wrap { order: -1; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .about-grid, .two-col, .contact-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
}
