/* =====================================================================
   Adarsh Kumar Thakur — Portfolio
   Futuristic "neural" theme · dark by default · light theme supported
   Edit the colors in the :root / [data-theme="light"] blocks below.
   ===================================================================== */

:root {
  --bg: #05070d;
  --bg-alt: #080b14;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --text: #e9edf7;
  --muted: #8f9ab3;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --pink: #f472b6;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 60%, var(--pink));
  --glow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 10px 40px -10px rgba(34, 211, 238, 0.35);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --radius: 20px;
  --header-h: 72px;
  --particle: 139, 92, 246;
  --grid-line: rgba(255, 255, 255, 0.045);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f7fc;
  --bg-alt: #eaf0f9;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --border: rgba(15, 23, 42, 0.1);
  --text: #0b1020;
  --muted: #55607a;
  --cyan: #0891b2;
  --violet: #6d28d9;
  --pink: #db2777;
  --glow: 0 0 0 1px rgba(8, 145, 178, 0.25), 0 10px 40px -12px rgba(8, 145, 178, 0.35);
  --shadow: 0 24px 60px -28px rgba(30, 41, 80, 0.3);
  --particle: 109, 40, 217;
  --grid-line: rgba(15, 23, 42, 0.06);
  color-scheme: light;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Space Grotesk", "Inter", sans-serif; line-height: 1.12; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(34, 211, 238, 0.3); }

.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

section { padding: clamp(80px, 11vw, 130px) 0; position: relative; }
section.alt { background: var(--bg-alt); }
.eyebrow { font-family: "JetBrains Mono", monospace; color: var(--cyan); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 14px; }
.section-title { font-size: clamp(1.9rem, 4.4vw, 3.2rem); max-width: 760px; margin-bottom: clamp(36px, 6vw, 60px); }

/* ---------- Background layers ---------- */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; pointer-events: none; }
.grid-overlay {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 20%, #000 10%, transparent 75%);
}
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.14), transparent 65%);
  transition: opacity 0.4s;
  will-change: transform;
}
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); z-index: 200; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 100;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.scrolled { border-color: var(--border); background: color-mix(in srgb, var(--bg) 80%, transparent); }
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.15rem; }
.logo-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; font-size: 0.9rem; letter-spacing: 0;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--glow);
}
.nav-links { display: flex; gap: 6px; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 99px; font-size: 0.92rem; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); background: var(--surface-strong); box-shadow: inset 0 0 0 1px var(--border); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); transition: transform 0.2s, border-color 0.2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--cyan); }
.ico-moon { display: none; }
[data-theme="light"] .ico-sun { display: none; }
[data-theme="light"] .ico-moon { display: block; }

.burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.3s, opacity 0.2s, top 0.3s; }
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 20px; }
.burger span:nth-child(3) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 14px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, background 0.25s; position: relative; overflow: hidden;
}
.btn-sm { padding: 10px 18px; font-size: 0.88rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); color: #04060b; box-shadow: 0 12px 34px -12px rgba(139, 92, 246, 0.7); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(34, 211, 238, 0.6); }
.btn-ghost { background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: var(--glow); }
.btn[disabled] { opacity: 0.75; cursor: progress; transform: none; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; padding: calc(var(--header-h) + 50px) 0 70px; display: flex; flex-direction: column; justify-content: center; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; margin-bottom: 26px; border-radius: 99px;
  font-size: 0.82rem; color: var(--muted); border: 1px solid var(--border); background: var(--surface);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 5rem); font-weight: 700; margin-bottom: 20px; }
.typed-line { font-size: clamp(1.05rem, 2.2vw, 1.4rem); font-weight: 500; margin-bottom: 18px; min-height: 2em; }
.prompt { color: var(--cyan); margin-right: 6px; }
.typed { color: var(--cyan); font-family: "JetBrains Mono", monospace; font-weight: 500; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--cyan); margin-left: 3px; vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.12rem); max-width: 600px; margin-bottom: 34px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.social-row { display: flex; gap: 12px; }
.social-row a { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); transition: transform 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s; }
.social-row a:hover { transform: translateY(-4px); border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow); }

/* Photo */
.hero-visual { display: grid; place-items: center; }
.photo-wrap { position: relative; width: min(100%, 420px); aspect-ratio: 1 / 1.1; transform-style: preserve-3d; transition: transform 0.15s ease-out; }
.photo-ring {
  position: absolute; inset: -4px; border-radius: 34px; overflow: hidden;
  box-shadow: 0 0 70px -6px rgba(139, 92, 246, 0.45), 0 0 120px -20px rgba(34, 211, 238, 0.35);
}
.photo-ring::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; margin: -80% 0 0 -80%;
  background: conic-gradient(from 0deg, var(--cyan), var(--violet), var(--pink), var(--cyan));
  animation: spin 7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.photo-frame { position: absolute; inset: 0; border-radius: 30px; overflow: hidden; background: #d9d2bf; border: 5px solid var(--bg); box-shadow: var(--shadow); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.scan { position: absolute; left: 0; right: 0; height: 90px; top: -90px; background: linear-gradient(to bottom, transparent, rgba(34, 211, 238, 0.28), transparent); animation: scan 5s ease-in-out infinite; pointer-events: none; }
@keyframes scan { 0% { top: -90px; } 60%, 100% { top: 110%; } }

.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 14px;
  font-family: "JetBrains Mono", monospace; font-size: 0.76rem; font-weight: 500; white-space: nowrap; z-index: 2;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-cyan { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.dot-violet { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.dot-pink { background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.chip-a { top: 8%; left: -9%; }
.chip-b { top: 52%; right: -10%; animation-delay: -2s; }
.chip-c { bottom: 6%; left: -5%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-12px); } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: clamp(50px, 8vw, 90px); }
.stat { padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform 0.3s, border-color 0.3s; }
.stat:hover { transform: translateY(-5px); border-color: var(--cyan); }
.stat b { display: block; font-family: "Space Grotesk", sans-serif; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 0.9rem; }

.scroll-hint { position: absolute; left: 50%; bottom: 22px; width: 24px; height: 40px; margin-left: -12px; border: 2px solid var(--border); border-radius: 14px; opacity: 0.8; }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--cyan); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--border); background: var(--surface); padding: 18px 0; }
.marquee-track { display: flex; width: max-content; gap: 46px; animation: marquee 38s linear infinite; }
.marquee-track span { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.15rem; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 46px; }
.marquee-track span::after { content: "✦"; color: var(--cyan); font-size: 0.8rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Generic card ---------- */
.card {
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
}
.card:hover { border-color: color-mix(in srgb, var(--cyan) 55%, var(--border)); box-shadow: var(--glow); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: "JetBrains Mono", monospace; font-size: 0.78rem; padding: 7px 13px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-strong); transition: transform 0.2s, border-color 0.2s, color 0.2s;
}
.chips li:hover { transform: translateY(-2px); border-color: var(--cyan); color: var(--cyan); }
.chips-sm li { font-size: 0.72rem; padding: 5px 10px; }

.bullets { display: grid; gap: 10px; margin-bottom: 18px; }
.bullets li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.97rem; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 2px; background: var(--grad); border-radius: 2px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(30px, 6vw, 70px); align-items: start; }
.about-copy p { color: var(--muted); font-size: 1.05rem; margin-bottom: 18px; }
.about-copy strong { color: var(--text); font-weight: 600; }
.pillars { display: grid; gap: 12px; margin-top: 28px; }
.pillar { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); transition: transform 0.25s, border-color 0.25s; }
.pillar:hover { transform: translateX(6px); border-color: var(--cyan); }
.pillar-n { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 0.85rem; color: var(--cyan); border: 1px solid var(--border); background: var(--surface-strong); }
.pillar h3 { font-size: 1.02rem; }
.pillar p { margin: 0; font-size: 0.88rem; }

.terminal { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, #000); box-shadow: var(--shadow); transition: transform 0.15s ease-out; }
[data-theme="light"] .terminal { background: #0f1424; color: #dbe4ff; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-size: 0.78rem; color: var(--muted); }
.term-body { padding: 22px; font-size: 0.84rem; line-height: 1.9; overflow-x: auto; white-space: pre; color: #cdd6f4; }
.c-k { color: #94a3b8; } .c-p { color: var(--cyan); } .c-s { color: #a6e3a1; } .c-n { color: #fab387; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card { padding: 26px; }
.skill-card:hover { transform: translateY(-6px); }
.skill-wide { grid-column: span 2; }
.skill-card header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.card-ix { font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: var(--cyan); padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; }
.skill-card h3 { font-size: 1.2rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: 26px; padding-left: 64px; max-width: 900px; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--cyan), var(--violet), transparent); opacity: 0.6; }
.t-item { position: relative; }
.t-node { position: absolute; left: -64px; top: 18px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); color: var(--cyan); box-shadow: var(--glow); }
.t-card { padding: 26px 28px; }
.t-card:hover { transform: translateX(6px); }
.t-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.t-date { color: var(--cyan); font-size: 0.82rem; display: inline-block; }
.tag-sm { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.t-card h3 { font-size: 1.4rem; margin-bottom: 4px; }
.t-card h4 { font-family: "Inter", sans-serif; font-weight: 500; color: var(--muted); font-size: 1rem; margin-bottom: 14px; letter-spacing: 0; }
.timeline-sm .t-card h4 { margin-bottom: 0; }
.timeline-sm .t-card h3 { font-size: 1.15rem; margin-top: 6px; }

/* ---------- Projects ---------- */
.project { padding: clamp(24px, 4vw, 38px); margin-bottom: 26px; transition: transform 0.15s ease-out, border-color 0.3s, box-shadow 0.3s; }
.project.featured { position: relative; overflow: hidden; }
.project.featured::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.project.featured::after { content: ""; position: absolute; width: 380px; height: 380px; right: -140px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent 70%); pointer-events: none; }
.project-flag { display: inline-block; font-family: "JetBrains Mono", monospace; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: #04060b; background: var(--grad); padding: 5px 12px; border-radius: 99px; margin-bottom: 14px; font-weight: 600; }
.project-flag.alt-flag { background: var(--surface-strong); color: var(--muted); border: 1px solid var(--border); }
.project h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 6px; }
.project-sub { color: var(--muted); margin-bottom: 22px; }
.project-body { max-width: 860px; }
.project-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--cyan); transition: gap 0.25s; }
.link-arrow:hover { gap: 14px; }

.arch { display: flex; align-items: stretch; gap: 0; margin: 10px 0 26px; flex-wrap: wrap; }
.arch-node { padding: 14px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-strong); min-width: 138px; }
.arch-node b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 0.95rem; }
.arch-node small { color: var(--muted); font-size: 0.76rem; }
.arch-link { width: 34px; align-self: center; height: 2px; position: relative; background: repeating-linear-gradient(90deg, var(--cyan) 0 6px, transparent 6px 10px); background-size: 20px 2px; animation: flow 1s linear infinite; }
.arch-link::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--cyan); }
@keyframes flow { to { background-position: 20px 0; } }

/* ---------- Education / certs ---------- */
.edu-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.timeline-sm { max-width: none; }
.certs { display: grid; gap: 16px; }
.cert { display: flex; align-items: center; gap: 18px; padding: 20px 24px; }
.cert:hover { transform: translateY(-4px); }
.cert-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: #04060b; background: var(--grad); flex: none; }
.cert h3 { font-size: 1.1rem; }
.cert p { color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
.cert .mono { font-size: 0.76rem; color: var(--cyan); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.contact-lead { color: var(--muted); font-size: 1.08rem; margin-bottom: 28px; }
.contact-list { display: grid; gap: 12px; }
.contact-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); transition: border-color 0.25s, transform 0.25s; }
.contact-item:hover { border-color: var(--cyan); transform: translateX(5px); }
.ci-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--cyan); background: var(--surface-strong); border: 1px solid var(--border); flex: none; }
.ci-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.ci-text small { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; }
.ci-text a, .ci-text span { font-weight: 500; overflow-wrap: anywhere; }
.ci-text a:hover { color: var(--cyan); }
.copy-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--muted); transition: color 0.2s, border-color 0.2s; flex: none; }
.copy-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.copy-btn.done { color: #34d399; border-color: #34d399; }

.contact-form { padding: clamp(24px, 4vw, 38px); display: grid; gap: 18px; }
.contact-form h3 { font-size: 1.5rem; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.86rem; font-weight: 500; }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; font: inherit; font-size: 0.97rem; color: var(--text);
  background: var(--surface-strong); border: 1px solid var(--border); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field input:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14); }
.field.invalid input, .field.invalid textarea { border-color: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; }
.err { color: #f87171; font-size: 0.8rem; min-height: 1.2em; }
.counter { color: var(--muted); font-size: 0.74rem; margin-left: auto; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(4, 6, 11, 0.25); border-top-color: #04060b; animation: spin 0.7s linear infinite; }
.btn.loading .spinner { display: block; }
.btn.loading .ico { display: none; }
.form-status { min-height: 1.5em; font-size: 0.92rem; text-align: center; }
.form-status.ok { color: #34d399; }
.form-status.fail { color: #f87171; }
.form-status a { text-decoration: underline; }

/* ---------- Footer / toast ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.to-top { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); transition: transform 0.2s, border-color 0.2s; }
.to-top:hover { transform: translateY(-3px); border-color: var(--cyan); color: var(--cyan); }

.toast-wrap { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 300; }
.toast { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: 14px; background: var(--surface-strong); border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: toastIn 0.35s ease; font-size: 0.92rem; }
.toast .ico { color: #34d399; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-wide { grid-column: span 2; }
  .nav-cta { display: none; }
}

@media (max-width: 900px) {
  .burger { display: block; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 4px; padding: 14px 20px 24px;
    background: color-mix(in srgb, var(--bg) 99%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform 0.35s ease, opacity 0.3s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 14px 16px; font-size: 1rem; }

  .hero { text-align: left; }
  .hero-grid, .about-grid, .contact-grid, .edu-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 10px; }
  .photo-wrap { width: min(78%, 330px); }
  .chip-a { left: -6%; } .chip-b { right: -6%; } .chip-c { left: -3%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .scroll-hint { display: none; }
}

@media (max-width: 640px) {
  .container { width: min(1180px, 100% - 32px); }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-wide { grid-column: auto; }
  .timeline { padding-left: 54px; }
  .timeline::before { left: 16px; }
  .t-node { left: -54px; width: 34px; height: 34px; border-radius: 11px; top: 20px; }
  .t-node .ico { width: 16px; height: 16px; }
  .t-card { padding: 20px; }
  .chip { font-size: 0.68rem; padding: 7px 11px; }
  .arch { flex-direction: column; align-items: flex-start; }
  .arch-node { width: 100%; }
  .arch-link { width: 2px; height: 22px; margin-left: 28px; background: repeating-linear-gradient(180deg, var(--cyan) 0 6px, transparent 6px 10px); animation: none; }
  .arch-link::after { right: auto; left: -4px; top: auto; bottom: -3px; border: 5px solid transparent; border-top: 7px solid var(--cyan); border-left-color: transparent; }
  .btn-row .btn { flex: 1 1 100%; }
  .footer-inner { flex-direction: column-reverse; text-align: center; }
  .toast-wrap { left: 16px; right: 16px; }
}

@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 16px; }
  .term-body { font-size: 0.74rem; }
}

@media (hover: none) { .cursor-glow { display: none; } .tilt { transform: none !important; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ---------- Video ---------- */
.video-card, .video-embed {
  position: relative; max-width: 980px; margin-inline: auto; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--border); background: #000; box-shadow: var(--shadow), 0 0 80px -20px rgba(139, 92, 246, 0.45);
}
.video-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); z-index: 2; pointer-events: none; }
.video-el { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; object-fit: contain; }
.video-embed { aspect-ratio: 16 / 9; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-note { text-align: center; color: var(--muted); margin-top: 18px; font-size: 0.95rem; }
@media (max-width: 640px) { .video-card, .video-embed { border-radius: 16px; } }
.video-card.video-missing .video-el { visibility: hidden; }
.video-card.video-missing::after {
  content: "Add your video file at  public/assets/intro.mp4"; position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center;
  font-family: "JetBrains Mono", monospace; font-size: 0.9rem; color: var(--muted); background: var(--surface-strong);
}
