/* ============================================================
   BHUPENDRA DANGI — PORTFOLIO STYLES
   Structure: Variables → Reset → Base → Layout → Components
              → Sections → Animations → Responsive
   ============================================================ */

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Accent */
  --accent:          #6c63ff;
  --accent-light:    #8b85ff;
  --accent-dark:     #4e47e0;
  --accent-glow:     rgba(108, 99, 255, 0.35);

  /* Dark theme (default) */
  --bg:              #0d0d12;
  --bg-secondary:    #13131a;
  --bg-card:         #17171f;
  --bg-card-hover:   #1e1e28;
  --border:          rgba(255,255,255,0.07);
  --border-hover:    rgba(108, 99, 255, 0.5);
  --text-primary:    #f0f0f5;
  --text-secondary:  #8888a8;
  --text-muted:      #555570;
  --shadow:          0 4px 24px rgba(0,0,0,0.4);
  --shadow-card:     0 8px 32px rgba(0,0,0,0.5);
  --navbar-bg:       rgba(13,13,18,0.85);

  /* Typography */
  --font-body:   'Inter', system-ui, sans-serif;
  --font-heading:'Space Grotesk', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', monospace;

  /* Spacing */
  --section-py: 7rem;
  --container:  1100px;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  /* Transitions */
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.45s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --bg:              #f8f8fc;
  --bg-secondary:    #efeff6;
  --bg-card:         #ffffff;
  --bg-card-hover:   #f4f4fb;
  --border:          rgba(0,0,0,0.08);
  --border-hover:    rgba(108, 99, 255, 0.45);
  --text-primary:    #111118;
  --text-secondary:  #555570;
  --text-muted:      #999;
  --shadow:          0 4px 24px rgba(0,0,0,0.08);
  --shadow-card:     0 8px 32px rgba(0,0,0,0.1);
  --navbar-bg:       rgba(248,248,252,0.88);
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-light); }

ul { list-style: none; }

::selection {
  background: var(--accent);
  color: #fff;
}

/* ─── Scroll Progress Bar ───────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─── Loader ────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  display: flex;
  gap: 10px;
}

.loader-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 0.9s ease-in-out infinite;
}
.loader-dot:nth-child(2) { animation-delay: 0.15s; }
.loader-dot:nth-child(3) { animation-delay: 0.3s;  }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1.1); opacity: 1;   }
}

/* ─── Layout Helpers ────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-py) 0;
  position: relative;
}

/* ─── Navbar ────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.nav-logo:hover { color: var(--accent); }
.logo-bracket { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.2rem 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
  border-radius: 2px;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition);
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 1.5rem;
  transform: translateY(-110%);
  transition: transform var(--transition-slow);
}
.mobile-nav.open {
  display: block;
  transform: translateY(0);
}
.mobile-link {
  display: block;
  padding: 0.85rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover { color: var(--accent); }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-hover);
}
.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-full { width: 100%; justify-content: center; }

/* ─── Section Headers ───────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Tags ──────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(108,99,255,0.12);
  color: var(--accent-light);
  border: 1px solid rgba(108,99,255,0.2);
  transition: all var(--transition);
}
.tag:hover {
  background: rgba(108,99,255,0.2);
  border-color: rgba(108,99,255,0.4);
}

/* Coloured variants */
.tag-blue   { background: rgba(59,130,246,0.12); color:#60a5fa; border-color:rgba(59,130,246,0.2); }
.tag-green  { background: rgba(16,185,129,0.12); color:#34d399; border-color:rgba(16,185,129,0.2); }
.tag-purple { background: rgba(139,92,246,0.12); color:#a78bfa; border-color:rgba(139,92,246,0.2); }
.tag-orange { background: rgba(249,115,22,0.12);  color:#fb923c; border-color:rgba(249,115,22,0.2); }
.tag-red    { background: rgba(239,68,68,0.12);   color:#f87171; border-color:rgba(239,68,68,0.2);  }
.tag-yellow { background: rgba(234,179,8,0.12);   color:#facc15; border-color:rgba(234,179,8,0.2);  }

/* ─── Hero ──────────────────────────────────────────────── */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
  opacity: 0.5;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}
.glow-1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; left: -150px;
  animation: glowFloat 8s ease-in-out infinite;
}
.glow-2 {
  width: 400px; height: 400px;
  background: #f43f5e;
  bottom: -100px; right: -100px;
  animation: glowFloat 10s ease-in-out infinite reverse;
}

@keyframes glowFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(30px, -30px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-greeting {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  min-height: 2rem;
}

.typed-text {
  color: var(--accent-light);
  font-weight: 600;
}

.cursor-blink {
  color: var(--accent);
  animation: blink 0.8s step-start infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.hero-socials a {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
}
.hero-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
  animation: fadeInUp 1s 1.2s both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: 0.4; transform: scaleY(1);   }
  50%      { opacity: 1;   transform: scaleY(1.1); }
}

/* ─── Summary & Skills ───────────────────────────────────── */
.summary-section { background: var(--bg-secondary); }

.summary-card {
  max-width: 980px;
  margin: 0 auto 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
}

.summary-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.96rem;
}

.skills-groups {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.skills-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.skills-group-card h3 {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  margin-bottom: 0.45rem;
}

.skills-group-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ─── Experience ─────────────────────────────────────────── */
.experience-section { background: var(--bg-secondary); }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 1.4rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--accent);
  z-index: 1;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.timeline-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}
.tl-orange { background: rgba(249,115,22,0.15); color: #fb923c; }
.tl-purple { background: rgba(139,92,246,0.15); color: #a78bfa; }
.tl-green  { background: rgba(16,185,129,0.15); color: #34d399; }
.tl-blue   { background: rgba(59,130,246,0.15);  color: #60a5fa; }

.timeline-icon--logo {
  background: #ffffff;
  border: 1px solid var(--border);
}

.timeline-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-meta { flex: 1; }

.timeline-role {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 0.25rem;
}

.timeline-period {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.timeline-period i { font-size: 0.75rem; }

.timeline-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.badge-current {
  background: rgba(16,185,129,0.15);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.3);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.timeline-bullets {
  margin: 0.9rem 0 0.25rem 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}
.timeline-bullets li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  list-style: disc;
}
.timeline-bullets li::marker { color: var(--accent); }
.timeline-bullets strong { color: var(--text-primary); }

.sub-bullets {
  border-top: none;
  padding-top: 0.4rem;
  margin-top: 0.4rem;
}

/* Sub-roles (Seva) */
.timeline-sublist {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  padding-left: 0.5rem;
}

.timeline-sub {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.sub-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-hover);
  margin-top: 5px;
  flex-shrink: 0;
}

.sub-role {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.sub-type {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.4rem;
}

.sub-period {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-company a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px dashed rgba(108,99,255,0.4);
  transition: color var(--transition), border-color var(--transition);
}
.timeline-company a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .timeline { padding-left: 1.75rem; }
  .timeline-marker { left: -1.75rem; }
}

/* ─── Education ──────────────────────────────────────────── */
.education-section { background: var(--bg); }

.edu-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  background: rgba(234,179,8,0.12);
  color: #facc15;
  border: 1px solid rgba(234,179,8,0.25);
}

/* ─── Certifications ─────────────────────────────────────── */
.certs-section { background: var(--bg); }

.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.cert-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.cert-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cert-icon--udemy    { background: rgba(167,139,250,0.15); color: #a78bfa; }
.cert-icon--selenium { background: rgba(249,115,22,0.15);  color: #fb923c; }

.cert-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.cert-issuer {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 0.2rem;
}

.cert-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.85rem;
  transition: all var(--transition);
  align-self: flex-start;
  margin-top: auto;
}
.cert-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


/* ─── Projects ──────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  align-items: stretch;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation-delay: var(--card-delay, 0s);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-hover);
}

.card-inner {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: rgba(108,99,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  color: var(--accent);
}
.card-icon--red   { background: rgba(239,68,68,0.15);  color: #f87171; }
.card-icon--green { background: rgba(16,185,129,0.15); color: #34d399; }

.card-link {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
}
.card-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.card-links { display: flex; gap: 0.5rem; }

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
  font-family: var(--font-mono);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  min-height: 9.2rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}
.card-desc strong { color: var(--text-primary); }

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 4.2rem;
  align-content: flex-start;
}

.card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ─── Contact ───────────────────────────────────────────── */
.contact-section {
  background: var(--bg-secondary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-tagline {
  font-size: 1.025rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.contact-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-list a {
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.contact-list a:hover { color: var(--accent); }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group input,
.form-group textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

.field-error {
  font-size: 0.8rem;
  color: #f87171;
  min-height: 1rem;
}

.form-feedback {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
}
.form-feedback.success {
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
  color: #34d399;
}
.form-feedback.error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-socials {
  display: flex;
  gap: 0.75rem;
}
.footer-socials a {
  color: var(--text-muted);
  font-size: 1rem;
  transition: color var(--transition), transform var(--transition);
}
.footer-socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* ─── Back to Top ───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: all var(--transition);
  z-index: 900;
  opacity: 0;
  transform: translateY(10px);
}
.back-to-top:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  animation: popIn 0.3s ease;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1);   }
}

/* ─── Reveal / Fade-in Animations ───────────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp 0.7s var(--delay, 0s) cubic-bezier(0.25,0.46,0.45,0.94) forwards;
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.25,0.46,0.45,0.94),
              transform 0.65s cubic-bezier(0.25,0.46,0.45,0.94);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid    { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-py: 5rem; }

  .nav-links   { display: none; }
  .hamburger   { display: flex; }

  .skills-groups { grid-template-columns: 1fr; }
  .about-grid    { grid-template-columns: 1fr; gap: 2.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .certs-grid    { grid-template-columns: 1fr; }
  .contact-grid  { grid-template-columns: 1fr; gap: 2.5rem; }

  .hero-name  { font-size: clamp(2rem, 10vw, 3rem); }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-socials { justify-content: center; }

  .back-to-top { bottom: 1.25rem; right: 1.25rem; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 260px; justify-content: center; }
  .card-actions { flex-direction: column; }
  .card-actions .btn { width: 100%; justify-content: center; }
}

/* ─── Focus Visible ─────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
