/* ============================================
   Priyanshu Kuldeep — Portfolio Stylesheet
   ============================================ */

:root {
  --bg: #0a0e17;
  --bg-alt: #0d1220;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e7eaf2;
  --text-dim: #93a0b8;
  --text-faint: #5c6780;
  --accent: #4f8cff;
  --accent-2: #8b5cf6;
  --accent-teal: #22d3c7;
  --success: #2ecc71;
  --danger: #ff5c72;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --gradient: linear-gradient(120deg, var(--accent), var(--accent-2));
  --font-head: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --nav-glass: rgba(10, 14, 23, 0.75);
  --mobile-glass: rgba(10, 14, 23, 0.98);
  --toast-bg: #10151f;
  --input-bg: rgba(255, 255, 255, 0.02);
  --tag-bg: rgba(79, 140, 255, 0.1);
  --tag-border: rgba(79, 140, 255, 0.25);
  --blob-opacity: 0.35;
  --accent-rgb: 79, 140, 255;
}

:root[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-alt: #ffffff;
  --surface: rgba(15, 23, 42, 0.035);
  --surface-hover: rgba(15, 23, 42, 0.07);
  --border: rgba(15, 23, 42, 0.1);
  --text: #171b26;
  --text-dim: #4c5568;
  --text-faint: #7c869c;
  --accent: #3763d6;
  --accent-2: #7c3aed;
  --accent-teal: #0c8f84;
  --success: #1f9d55;
  --danger: #d6304a;
  --shadow: 0 20px 50px -20px rgba(15, 23, 42, 0.18);

  --nav-glass: rgba(255, 255, 255, 0.75);
  --mobile-glass: rgba(255, 255, 255, 0.97);
  --toast-bg: #ffffff;
  --input-bg: rgba(15, 23, 42, 0.02);
  --tag-bg: rgba(55, 99, 214, 0.08);
  --tag-border: rgba(55, 99, 214, 0.22);
  --blob-opacity: 0.16;
  --accent-rgb: 55, 99, 214;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex-shrink: 0; }
.icon-lg { width: 1.6em; height: 1.6em; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* ---------- Cursor glow (desktop only) ---------- */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.10), transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}
@media (max-width: 768px) { .cursor-glow { display: none; } }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: var(--nav-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px 0;
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}
.logo-dot { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }
.nav-link:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 3px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-link:not(.nav-cta):hover::after,
.nav-link:not(.nav-cta).active::after { transform: scaleX(1); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.4s ease, background 0.25s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(18deg); }
.theme-toggle .icon { position: absolute; transition: opacity 0.3s ease, transform 0.4s ease; }
.theme-toggle .icon-sun { opacity: 0; transform: scale(0.4) rotate(-90deg); fill: none; }
.theme-toggle .icon-moon { opacity: 1; transform: scale(1) rotate(0deg); }
:root[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; transform: scale(1) rotate(0deg); }
:root[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: scale(0.4) rotate(90deg); }
.nav-cta {
  background: var(--gradient);
  color: #fff !important;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--gradient); opacity: 0.9; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(140, 170, 255, 0.45);
  transform: scale(0);
  pointer-events: none;
  animation: rippleAnim 0.6s ease-out forwards;
}
@keyframes rippleAnim { to { transform: scale(2.8); opacity: 0; } }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(var(--accent-rgb), 0.55);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -8px rgba(var(--accent-rgb), 0.7); }
.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn-outline:hover { border-color: var(--accent); transform: translateY(-3px); }
.btn-ghost { color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 16px 34px; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
  overflow: hidden;
}
.particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--blob-opacity);
  z-index: 0;
  animation: float 16s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
.blob-1 { width: 420px; height: 420px; background: var(--accent); top: -120px; left: -100px; }
.blob-2 { width: 380px; height: 380px; background: var(--accent-2); bottom: -140px; right: -80px; animation-delay: -5s; }
.blob-3 { width: 300px; height: 300px; background: var(--accent-teal); top: 40%; left: 60%; animation-delay: -10s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  text-align: center;
}
.hero-avatar {
  width: 140px;
  height: 140px;
  margin: 0 auto 22px;
  border-radius: 50%;
  padding: 4px;
  background: var(--gradient);
  animation: avatarFloat 5s ease-in-out infinite;
  box-shadow: 0 12px 34px -10px rgba(var(--accent-rgb), 0.5);
}
.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  display: block;
}
@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-eyebrow {
  color: var(--accent-teal);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1.05;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.hero-role {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 600;
  color: var(--text);
  min-height: 2.2em;
  margin-bottom: 14px;
}
.cursor-blink { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 22px;
}
.hero-summary {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 34px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}
.hero-socials {
  display: flex;
  justify-content: center;
  gap: 18px;
}
.hero-socials a {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.25s ease;
}
.hero-socials a:hover {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  transform: translateY(-4px);
}
.hero-socials a:hover .icon, .footer-socials a:hover .icon { animation: wiggle 0.45s ease; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-14deg); }
  75% { transform: rotate(14deg); }
}

.hero-name-wrap { position: relative; display: inline-block; }
.sparkle {
  position: absolute;
  color: var(--accent-teal);
  animation: twinkle 2.6s ease-in-out infinite;
  pointer-events: none;
}
.sparkle-1 { top: -14px; left: -30px; font-size: 1.5rem; animation-delay: 0s; }
.sparkle-2 { top: 10px; right: -32px; font-size: 1.1rem; animation-delay: 0.8s; }
.sparkle-3 { bottom: -16px; left: 42%; font-size: 0.9rem; animation-delay: 1.6s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(20deg); }
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border);
  border-radius: 20px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--accent);
  animation: scrollcue 1.8s ease infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; top: 8px; }
  100% { opacity: 0; top: 24px; }
}

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-teal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.82rem;
  margin-bottom: 10px;
}
.section-tag::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 48px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-text p { color: var(--text-dim); margin-bottom: 18px; font-size: 1.02rem; }
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.about-photo {
  grid-column: 1 / -1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.about-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.about-photo:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.stat-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.stat-number, .stat-suffix {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-teal);
}
.stat-label { display: block; color: var(--text-dim); font-size: 0.88rem; margin-top: 6px; }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.skill-card:hover { transform: translateY(-6px); border-color: var(--accent); background: var(--surface-hover); }
.skill-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--accent);
}
.skill-card-head h3 { font-family: var(--font-head); font-size: 1.08rem; color: var(--text); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.25s ease, transform 0.25s ease;
}
.tag:hover { background: var(--gradient); transform: translateY(-2px); }
.tag-sm { font-size: 0.78rem; padding: 5px 11px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  opacity: 0.4;
}
.timeline-item { position: relative; margin-bottom: 44px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -32px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18);
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s ease;
}
.timeline-card:hover { border-color: var(--accent); }
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.timeline-head h3 { font-family: var(--font-head); font-size: 1.2rem; }
.timeline-date {
  color: var(--accent-teal);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.timeline-company { color: var(--text-dim); font-weight: 500; margin-bottom: 12px; }
.timeline-desc { color: var(--text-dim); margin-bottom: 14px; }
.timeline-list li {
  color: var(--text-dim);
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.timeline-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.project-domain {
  display: inline-block;
  color: var(--accent-teal);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}
.project-card h3 { font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 12px; }
.project-card p { color: var(--text-dim); margin-bottom: 14px; }
.project-list { margin-bottom: 18px; }
.project-list li {
  color: var(--text-dim);
  padding-left: 20px;
  position: relative;
  margin-bottom: 7px;
  font-size: 0.92rem;
}
.project-list li::before {
  content: "→";
  position: absolute;
  left: 0; color: var(--accent);
}

/* ---------- What I Do ---------- */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.capability-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.capability-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  color: var(--accent-teal);
}

/* ---------- Achievements ---------- */
.achievement-list { display: grid; gap: 14px; }
.achievement-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  color: var(--text-dim);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.achievement-list li:hover { border-color: var(--success); transform: translateX(4px); }
.check {
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Education ---------- */
.education-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  color: var(--accent);
}
.education-card h3 { font-family: var(--font-head); color: var(--text); font-size: 1.15rem; margin-bottom: 6px; }
.education-school { color: var(--text-dim); margin-bottom: 4px; }
.education-meta { color: var(--text-faint); font-size: 0.88rem; }

/* ---------- CTA ---------- */
.cta-section { padding: 100px 0; }
.cta-inner { text-align: center; }
.cta-inner h2 { font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 14px; }
.cta-inner p { color: var(--text-dim); margin-bottom: 30px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 50px 0 24px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}
.footer-tagline { color: var(--text-faint); font-size: 0.9rem; margin-top: 6px; }
.footer-socials { display: flex; gap: 14px; }
.footer-socials a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.25s ease;
}
.footer-socials a:hover { color: #fff; background: var(--gradient); border-color: transparent; }
.footer-copy {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 26px; right: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 90;
  box-shadow: 0 10px 24px -8px rgba(var(--accent-rgb), 0.6);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ============================================
   Contact page
   ============================================ */
.page-hero {
  position: relative;
  padding: 160px 0 80px;
  overflow: hidden;
  text-align: center;
}
.page-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.page-subtitle { color: var(--text-dim); max-width: 560px; margin: 0 auto; }

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 50px;
  align-items: start;
}
.contact-avatar {
  width: 84px;
  height: 84px;
  margin-bottom: 18px;
  border-radius: 50%;
  padding: 3px;
  background: var(--gradient);
  box-shadow: 0 10px 26px -10px rgba(var(--accent-rgb), 0.5);
}
.contact-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  display: block;
}
.contact-info h2 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 10px; }
.contact-info-desc { color: var(--text-dim); margin-bottom: 26px; font-size: 0.95rem; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: transform 0.25s ease;
}
.contact-item:hover { transform: translateX(6px); color: var(--accent); }
.contact-item strong { display: block; font-size: 0.85rem; color: var(--text-faint); font-weight: 600; }
.contact-item span span { color: var(--text); font-size: 0.98rem; word-break: break-word; }
.contact-item:hover span span { color: var(--accent-teal); }
.contact-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #6fe3a0;
  font-size: 0.88rem;
  font-weight: 600;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* ---------- Contact form ---------- */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { position: relative; margin-bottom: 22px; }
.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 14px 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}
.form-field label {
  position: absolute;
  left: 14px; top: 16px;
  color: var(--text-faint);
  font-size: 0.98rem;
  pointer-events: none;
  transition: all 0.2s ease;
  background: transparent;
}
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  top: -8px;
  left: 10px;
  font-size: 0.74rem;
  padding: 0 6px;
  background: var(--bg-alt);
  color: var(--accent-teal);
  border-radius: 4px;
}
.field-error {
  display: none;
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 6px;
}
.form-field.invalid input,
.form-field.invalid textarea { border-color: var(--danger); }
.form-field.invalid .field-error { display: block; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.btn-submit { width: 100%; justify-content: center; position: relative; }
.btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-submit.loading .btn-text { opacity: 0.6; }
.btn-submit.loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  color: var(--text);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 200;
  max-width: 90vw;
  font-size: 0.92rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-left-color: var(--danger); }

/* ---------- Smooth theme-switch fades on themed surfaces ---------- */
.stat-card, .skill-card, .timeline-card, .project-card, .capability-item,
.achievement-list li, .education-card, .contact-form-wrap, .contact-item,
.contact-icon, .toast, .navbar, .form-field input, .form-field textarea,
.footer, .hero-socials a, .footer-socials a, .theme-toggle, .btn-outline {
  transition-property: transform, border-color, background-color, box-shadow, color;
  transition-duration: 0.3s, 0.3s, 0.4s, 0.3s, 0.4s;
  transition-timing-function: ease;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 68px; right: 0;
    width: min(280px, 80vw);
    height: calc(100vh - 68px);
    background: var(--mobile-glass);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 6px;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { padding: 14px 16px; }
  .nav-cta { margin-left: 0; text-align: center; }
  .nav-toggle { display: flex; }

  .about-stats { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
}

@media (max-width: 480px) {
  .capability-grid { grid-template-columns: 1fr 1fr; }
  .btn { padding: 12px 20px; font-size: 0.88rem; }
  .contact-form-wrap { padding: 26px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
