@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Mono:wght@300;400;500&family=Cabinet+Grotesk:wght@300;400;500;700;800&display=swap');

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #16161f;
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e97b;
  --text: #f0f0fa;
  --text2: #9999bb;
  --text3: #555577;
  --border: rgba(108, 99, 255, 0.15);
  --card: rgba(22, 22, 31, 0.8);
  --glow: rgba(108, 99, 255, 0.3);
  --gx: 0;
  --gy: 0;
  --gz: 0;
  /* Smooth theme transitions */
  transition:
    background-color 0.6s ease,
    color 0.6s ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cabinet Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

/* Custom cursor */
#cursor {
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.1s ease, background 0.2s ease;
  mix-blend-mode: screen;
}

#cursor-trail {
  width: 40px; height: 40px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 99998;
  transition: all 0.15s ease;
  opacity: 0.5;
}

body:hover #cursor { opacity: 1; }

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Nav */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.7);
  transition: all 0.3s ease;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--text2);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

/* Hero */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(108, 99, 255, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 30% 80%, rgba(255, 101, 132, 0.06) 0%, transparent 60%);
  transform: translate(calc(var(--gx) * -30px), calc(var(--gy) * -30px));
  will-change: transform;
}

.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 at center, black 30%, transparent 80%);
  transform: translate(calc(var(--gx) * 15px), calc(var(--gy) * 15px));
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  margin-bottom: 2rem;
  letter-spacing: 0.08em;
  animation: fadeSlideUp 0.6s ease forwards;
  opacity: 0;
}

.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  animation: fadeSlideUp 0.6s 0.1s ease forwards;
  opacity: 0;
}

.hero-name .line2 {
  color: transparent;
  -webkit-text-stroke: 1px var(--text3);
}

.hero-name .accent { color: var(--accent); }

.hero-desc {
  font-size: 1.15rem;
  color: var(--text2);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 3rem;
  animation: fadeSlideUp 0.6s 0.2s ease forwards;
  opacity: 0;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  animation: fadeSlideUp 0.6s 0.3s ease forwards;
  opacity: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: none;
}

.btn-primary:hover {
  background: #7c74ff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(108, 99, 255, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: none;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108, 99, 255, 0.05);
}

.hero-socials {
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 2;
  animation: fadeIn 1s 0.5s ease forwards;
  opacity: 0;
}

.social-link {
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  text-decoration: none;
  transition: all 0.3s ease;
  background: var(--card);
  backdrop-filter: blur(10px);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(-4px);
  box-shadow: 4px 0 20px var(--glow);
}

.social-link svg { width: 18px; height: 18px; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 1s 0.8s ease forwards;
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Sections */
section {
  padding: 7rem 4rem;
  position: relative;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

/* About */
#about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

.about-text p {
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { border-color: rgba(108, 99, 255, 0.3); }

.stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text3);
  margin-top: 0.3rem;
  letter-spacing: 0.02em;
}

.about-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.avatar-container {
  width: 320px;
  height: 320px;
  position: relative;
  /* Parallax from mouse/gyro â€” X/Y only, no rotation here */
  transform: translate(calc(var(--gx) * 15px), calc(var(--gy) * 15px));
  will-change: transform;
  transition: transform 0.06s linear;
}

/* motion-wrapper is now ONLY a layout shell â€” no competing transform */
.motion-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Primary spinning ring â€” pure CSS animation, isolated on its own layer */
.avatar-ring {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px solid rgba(108, 99, 255, 0.2);
  /* Promoted to GPU compositing layer â€” animation never causes layout */
  will-change: transform;
  animation: ring-spin 22s linear infinite;
  /* Preserve-3d ensures the ring stays as a distinct composited layer */
  transform-style: preserve-3d;
  transform-origin: center center;
}

/* Glowing dot orbiting the ring */
.avatar-ring::before {
  content: '';
  position: absolute;
  top: -4px;
  left: calc(50% - 4px);
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px 2px rgba(108, 99, 255, 0.6);
}

/* Secondary decorative ring â€” counter-rotates subtly for depth */
.avatar-ring::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px dashed rgba(108, 99, 255, 0.12);
  animation: ring-spin 40s linear infinite reverse;
  will-change: transform;
}

/* Floating accent bubbles â€” use translate3d so they composite separately */
.bubble {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  /* contain:layout prevents bubble moves from triggering full reflow */
  contain: strict;
  will-change: transform;
  /* Smooth out the parallax jump using a short transition */
  transition: transform 0.15s ease-out;
}

.bubble-1 {
  width: 12px; height: 12px;
  top: 15%; left: 10%;
  color: var(--accent);
  transform: translate3d(calc(var(--gx) * 30px), calc(var(--gy) * 30px), 0);
  box-shadow: 0 0 10px 2px rgba(108, 99, 255, 0.4);
}

.bubble-2 {
  width: 9px; height: 9px;
  bottom: 25%; right: 5%;
  color: var(--accent2);
  transform: translate3d(calc(var(--gx) * -20px), calc(var(--gy) * -20px), 0);
  box-shadow: 0 0 8px 2px rgba(255, 101, 132, 0.35);
}

.bubble-3 {
  width: 6px; height: 6px;
  top: 70%; right: 18%;
  color: var(--accent3);
  transform: translate3d(calc(var(--gx) * 45px), calc(var(--gy) * -30px), 0);
  box-shadow: 0 0 8px 2px rgba(67, 233, 123, 0.35);
}

.avatar-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bg3);
  /* Multi-layer gradient border for premium feel */
  border: 2px solid transparent;
  background-clip: padding-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  overflow: hidden;
  z-index: 1;
  box-shadow:
    0 0 0 1px rgba(108, 99, 255, 0.25),
    0 0 30px rgba(108, 99, 255, 0.15),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
  /* Slight tilt mirroring gx/gy for depth â€” much less aggressive than before */
  transform: perspective(600px)
    rotateY(calc(var(--gx) * 6deg))
    rotateX(calc(var(--gy) * -6deg));
  transition: transform 0.12s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}

.avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.08);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.avatar-inner:hover {
  box-shadow:
    0 0 0 1px rgba(108, 99, 255, 0.5),
    0 0 40px rgba(108, 99, 255, 0.3),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.avatar-inner:hover img {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1.1);
}

.avatar-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(108, 99, 255, 0.12), transparent 65%);
  z-index: 2;
  pointer-events: none;
}

/* Ring animations â€” isolated keyframes so CSS optimiser keeps them on GPU */
@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Skills */
#skills { background: var(--bg2); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: none;
}

.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(108, 99, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card:hover::after { opacity: 1; }
.skill-card:hover {
  border-color: rgba(108, 99, 255, 0.4);
  transform: translateY(-4px);
}

.skill-icon {
  width: 100px; height: 100px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.skill-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.skill-bar-container {
  width: 100%;
  height: 3px;
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Categories */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.skill-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.category-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--accent);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text2);
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108, 99, 255, 0.05);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: none;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.6s ease;
}

.project-card:hover::before { transform: scaleX(1); }
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108, 99, 255, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.project-number {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--text3);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.project-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  transition: color 0.2s ease;
}

.project-card:hover .project-title { color: var(--accent); }

.project-desc {
  color: var(--text2);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tech-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  background: rgba(108, 99, 255, 0.1);
  color: var(--accent);
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text2);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.project-card:hover .project-link { color: var(--accent); }

.project-link svg {
  width: 16px;
  transition: transform 0.2s ease;
}

.project-card:hover .project-link svg { transform: translate(2px, -2px); }

/* Experience */
#experience { background: var(--bg2); }

.timeline {
  position: relative;
  margin-top: 3rem;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
  padding-left: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg2);
  box-shadow: 0 0 12px var(--glow);
}

.timeline-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.timeline-company {
  color: var(--text2);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.timeline-desc {
  color: var(--text3);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Contact */
#contact {
  text-align: center;
  padding: 7rem 4rem;
  position: relative;
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(108, 99, 255, 0.08), transparent);
}

.contact-content { position: relative; z-index: 2; max-width: 600px; margin: 0 auto; }

.contact-email {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin: 2rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.contact-email:hover { color: var(--accent); }
.contact-email:hover::after { transform: scaleX(1); }

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text2);
  text-decoration: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.3s ease;
  background: var(--card);
}

.contact-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-social-link svg { width: 16px; height: 16px; }

/* Footer */
footer {
  padding: 2rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text3);
}

/* Animations */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Floating particles */
.particle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  animation: float linear infinite;
}

@keyframes float {
  from { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.5; }
  to { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* â”€â”€ Hamburger button (hidden on desktop) â”€â”€â”€ */
#hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: none;
  padding: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

#hamburger:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.06);
}

#hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text2);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
  transform-origin: center;
}

#hamburger.open span { background: var(--accent); }
#hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* â”€â”€ Mobile Menu Drawer â”€â”€â”€ */
#mobile-menu {
  position: fixed;
  top: 60px; /* just below nav */
  left: 0; right: 0;
  z-index: 99;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  display: none; /* JS toggles to flex */
  flex-direction: column;
  gap: 1.2rem;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

#mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mobile-links li { opacity: 0; transform: translateX(-10px); }

#mobile-menu.open .mobile-links li {
  animation: mob-link-in 0.3s ease forwards;
}

#mobile-menu.open .mobile-links li:nth-child(1) { animation-delay: 0.04s; }
#mobile-menu.open .mobile-links li:nth-child(2) { animation-delay: 0.08s; }
#mobile-menu.open .mobile-links li:nth-child(3) { animation-delay: 0.12s; }
#mobile-menu.open .mobile-links li:nth-child(4) { animation-delay: 0.16s; }
#mobile-menu.open .mobile-links li:nth-child(5) { animation-delay: 0.20s; }

@keyframes mob-link-in {
  to { opacity: 1; transform: translateX(0); }
}

.mobile-links a {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text2);
  text-decoration: none;
  padding: 0.5rem 0;
  letter-spacing: -0.02em;
  transition: color 0.2s ease, padding-left 0.2s ease;
  border-bottom: 1px solid var(--border);
}

.mobile-links a:hover,
.mobile-links a:active {
  color: var(--accent);
  padding-left: 8px;
}

.mobile-socials {
  display: flex;
  gap: 0.8rem;
  padding-top: 0.5rem;
}

.mobile-socials .social-link {
  width: 38px; height: 38px;
}

/* Mobile */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  #hamburger { display: flex; }
  #mobile-menu { display: flex; } /* visibility controlled by .open + opacity */
  #hero { padding: 0 1.5rem; padding-top: 5rem; }
  .hero-socials { display: none; }
  section { padding: 4rem 1.5rem; }
  .hero-name {
    font-size: clamp(2rem, 10vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    width: 100%;
    word-break: keep-all;
  }
  .hero-desc { font-size: 1rem; margin-bottom: 2rem; }
  #about { grid-template-columns: 1fr; gap: 3rem; }
  .avatar-container { width: 200px; height: 200px; margin: 0 auto; }
  .contact-socials {
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2.5rem;
  }
  .contact-social-link {
    flex: 0 1 calc(33.333% - 0.75rem);
    justify-content: center;
    padding: 0.6rem 0.2rem;
    font-size: 0.65rem;
    gap: 0.3rem;
    white-space: nowrap;
  }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* Typewriter cursor */
.typewriter::after {
  content: '|';
  color: var(--accent);
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* â”€â”€ Shake / Glitch Effects â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Full-body glitch: RGB channel split + skew + scanlines */
.glitch-active {
  animation: glitch-body 0.6s steps(1) forwards;
  position: relative;
}

.glitch-active::before,
.glitch-active::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  animation: glitch-layer 0.6s steps(1) forwards;
}

.glitch-active::before {
  background: rgba(255, 0, 80, 0.08);
  mix-blend-mode: screen;
  animation-delay: 0.05s;
  clip-path: inset(30% 0 40% 0);
}

.glitch-active::after {
  background: rgba(0, 230, 255, 0.08);
  mix-blend-mode: screen;
  animation-delay: 0.1s;
  clip-path: inset(60% 0 5% 0);
}

@keyframes glitch-body {
  0%   { transform: skewX(0deg);  filter: none; }
  8%   { transform: skewX(6deg);  filter: hue-rotate(90deg) brightness(1.3); }
  16%  { transform: skewX(-6deg); filter: hue-rotate(180deg) saturate(3); }
  24%  { transform: skewX(0deg);  filter: none; }
  32%  { transform: skewX(4deg);  filter: hue-rotate(270deg) brightness(1.2); clip-path: inset(20% 0 30% 0); }
  40%  { transform: skewX(-4deg); filter: hue-rotate(360deg); clip-path: none; }
  48%  { transform: skewX(0deg);  filter: hue-rotate(90deg) brightness(1.5) contrast(1.5); }
  56%  { transform: skewX(-8deg); filter: none; }
  64%  { transform: skewX(2deg);  filter: hue-rotate(180deg) saturate(4); }
  72%  { transform: skewX(0deg);  filter: none; }
  80%  { transform: skewX(5deg);  filter: hue-rotate(270deg) brightness(1.4); }
  88%  { transform: skewX(-2deg); filter: none; }
  100% { transform: skewX(0deg);  filter: none; }
}

@keyframes glitch-layer {
  0%   { clip-path: inset(0 0 100% 0); opacity: 0; }
  10%  { clip-path: inset(10% 0 60% 0); opacity: 1; }
  30%  { clip-path: inset(50% 0 20% 0); opacity: 0.8; }
  50%  { clip-path: inset(20% 0 70% 0); opacity: 1; }
  70%  { clip-path: inset(70% 0 5%  0); opacity: 0.6; }
  90%  { clip-path: inset(40% 0 30% 0); opacity: 0.9; }
  100% { clip-path: inset(0 0 100% 0); opacity: 0; }
}

/* Scanline overlay during glitch */
.glitch-active body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 9998;
  animation: scanlines-pulse 0.6s ease forwards;
}

@keyframes scanlines-pulse {
  0%, 100% { opacity: 0; }
  20%, 80%  { opacity: 1; }
}

/* Theme flash â€” white flash that fires when theme changes */
@keyframes theme-flash {
  0%   { opacity: 0.6; }
  100% { opacity: 0; }
}

.theme-flash-overlay {
  position: fixed;
  inset: 0;
  background: white;
  pointer-events: none;
  z-index: 10001;
  animation: theme-flash 0.4s ease-out forwards;
}

.particle-burst {
  position: fixed;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  animation: burst-move 0.8s ease-out forwards;
}

@keyframes burst-move {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(var(--vx), var(--vy)) scale(0); opacity: 0; }
}

/* â”€â”€ Linux Terminal Overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

#terminal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#terminal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

#terminal-window {
  width: min(600px, 92vw);
  background: #0d1117;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.5),
    0 30px 80px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(var(--accent, 108, 99, 255), 0.12);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'DM Mono', 'Fira Code', 'Courier New', monospace;
  position: relative;
}

/* Scanline texture on terminal */
#terminal-window::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 1;
  border-radius: 12px;
}

#terminal-overlay.active #terminal-window {
  transform: translateY(0) scale(1);
}

/* Title bar */
#terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  user-select: none;
}

.term-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red    { background: #ff5f57; box-shadow: 0 0 4px rgba(255,95,87,0.6); }
.dot-yellow { background: #febc2e; box-shadow: 0 0 4px rgba(254,188,46,0.6); }
.dot-green  { background: #28c840; box-shadow: 0 0 4px rgba(40,200,64,0.6); }

.term-title {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  flex: 1;
  text-align: center;
  margin-right: 4.5rem; /* optical center accounting for dots */
}

/* Terminal body */
#terminal-body {
  padding: 1.2rem 1.4rem 1.4rem;
  min-height: 160px;
  position: relative;
  z-index: 2;
}

/* Previous output lines */
#terminal-output {
  margin-bottom: 0.5rem;
}

.term-output-line {
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre;
}

.term-output-line.dim   { color: rgba(255,255,255,0.25); }
.term-output-line.ok    { color: #28c840; }
.term-output-line.info  { color: #58a6ff; }
.term-output-line.warn  { color: #febc2e; }
.term-output-line.branch { color: #e8a44a; }
.term-output-line.arrow  { color: #a5d6ff; }

/* Active prompt line */
#terminal-prompt-line {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.85rem;
  line-height: 1.6;
  flex-wrap: wrap;
}

.term-user  { color: #28c840; font-weight: 500; }
.term-at    { color: rgba(255,255,255,0.4); }
.term-colon { color: rgba(255,255,255,0.3); }
.term-path  { color: #58a6ff; }
.term-dollar { color: rgba(255,255,255,0.5); margin-left: 2px; }

#terminal-cmd {
  color: #f0f0fa;
  letter-spacing: 0.02em;
}

.term-cursor {
  color: var(--accent, #6c63ff);
  animation: term-blink 1s step-end infinite;
  font-size: 0.75rem;
  line-height: 1;
  vertical-align: middle;
}

@keyframes term-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Fade-in for each output line */
@keyframes term-line-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.term-output-line {
  animation: term-line-in 0.18s ease forwards;
}

/* â”€â”€ Custom Right-Click Context Menu â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

#ctx-menu {
  position: fixed;
  z-index: 30000;
  min-width: 220px;
  background: rgba(13, 17, 23, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(108, 99, 255, 0.1);
  backdrop-filter: blur(20px);
  padding: 6px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88) translateY(-6px);
  transform-origin: top left;
  transition:
    opacity 0.18s ease,
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

#ctx-menu.visible {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
}

/* Flip origin when near bottom/right edge */
#ctx-menu.flip-x { transform-origin: top right; }
#ctx-menu.flip-y { transform-origin: bottom left; }
#ctx-menu.flip-x.flip-y { transform-origin: bottom right; }

/* Header */
.ctx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 6px;
}

.ctx-logo {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.ctx-logo span { color: var(--accent); }

.ctx-version {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.04em;
}

/* Separator */
.ctx-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 4px 0;
}

/* Menu items */
.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Cabinet Grotesk', sans-serif;
  font-size: 0.85rem;
  text-align: left;
  cursor: none;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
  overflow: hidden;
}

.ctx-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.15s ease;
  border-radius: 8px;
}

.ctx-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.ctx-item:hover::before { opacity: 0.07; }

.ctx-item:active { transform: scale(0.97); }

/* Icon */
.ctx-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.ctx-icon svg {
  width: 14px;
  height: 14px;
  color: inherit;
}

.ctx-github { color: #e6edf3; }
.ctx-linkedin { color: #0a66c2; }
.ctx-facebook { color: #1877f2; }

/* Label */
.ctx-label {
  flex: 1;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* Keyboard hint */
.ctx-hint {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}

.ctx-item:hover .ctx-hint { color: rgba(255, 255, 255, 0.4); }

/* "Copied!" flash state */
.ctx-item.copied .ctx-label { color: #28c840; }
.ctx-item.copied .ctx-icon  { color: #28c840; }

/* Stagger animation on open */
#ctx-menu.visible .ctx-item {
  animation: ctx-item-in 0.2s ease forwards;
}

#ctx-menu.visible .ctx-item:nth-of-type(1) { animation-delay: 0.02s; }
#ctx-menu.visible .ctx-item:nth-of-type(2) { animation-delay: 0.04s; }
#ctx-menu.visible .ctx-item:nth-of-type(3) { animation-delay: 0.06s; }
#ctx-menu.visible .ctx-item:nth-of-type(4) { animation-delay: 0.08s; }
#ctx-menu.visible .ctx-item:nth-of-type(5) { animation-delay: 0.10s; }
#ctx-menu.visible .ctx-item:nth-of-type(6) { animation-delay: 0.12s; }
#ctx-menu.visible .ctx-item:nth-of-type(7) { animation-delay: 0.14s; }

@keyframes ctx-item-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   B L O G   S E C T I O N S   &   C O M P O N E N T S
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.blog-hero {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 4rem 4rem;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at center 80%, rgba(108, 99, 255, 0.06) 0%, transparent 70%);
}

.blog-hero .section-title {
  margin-top: 1rem;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.blog-hero-desc {
  color: var(--text2);
  max-width: 600px;
  font-size: 1.1rem;
  line-height: 1.7;
  margin-top: 1rem;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 4rem 8rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.blog-card:hover::before {
  transform: scaleX(1);
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(108, 99, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 20px rgba(108, 99, 255, 0.1);
}

.blog-card-image {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}

.blog-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.blog-card-meta .date {
  color: var(--text3);
}

.blog-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
  color: var(--accent);
}

.blog-card-excerpt {
  color: var(--text2);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.blog-card-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text2);
}

.blog-card-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  margin-top: auto;
  transition: gap 0.2s ease, color 0.2s ease;
}

.blog-card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-link {
  color: var(--accent);
  gap: 0.8rem;
}

.blog-card:hover .blog-card-link svg {
  transform: translate(2px, -2px);
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   A R T I C L E   R E A D E R
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.article-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 9rem 2rem 8rem;
}

.article-header {
  margin-bottom: 3.5rem;
  text-align: center;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--text2);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.article-back-link:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

.article-back-link svg {
  width: 14px;
  height: 14px;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--text2);
  margin-bottom: 1.5rem;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.article-meta i {
  color: var(--accent);
}

.article-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  color: var(--text);
}

.article-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.article-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text2);
  background: rgba(108, 99, 255, 0.03);
}

.article-cover-container {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  margin-bottom: 3.5rem;
  position: relative;
  background: var(--bg2);
}

.article-cover-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Article content typography */
.article-content {
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--text2);
  letter-spacing: -0.005em;
}

.article-content p {
  margin-bottom: 1.8rem;
}

.article-content p strong {
  color: var(--text);
}

.article-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin: 3.5rem 0 1.5rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 1.2rem;
  line-height: 1.3;
}

.article-content ul, .article-content ol {
  margin: 0 0 1.8rem 1.8rem;
}

.article-content li {
  margin-bottom: 0.6rem;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.8rem 0 0.8rem 1.8rem;
  margin: 2.5rem 0;
  font-style: italic;
  color: var(--text);
  background: rgba(108, 99, 255, 0.02);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.article-content blockquote p {
  margin-bottom: 0;
}

.article-content blockquote cite {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: var(--text3);
  margin-top: 0.8rem;
  font-style: normal;
}

/* Code Snippets & Copy Button */
.article-content pre {
  margin: 2rem 0;
  padding: 1.8rem;
  border-radius: 12px;
  background: #0d0d14 !important; /* Fixed dark code block */
  border: 1px solid var(--border);
  overflow-x: auto;
  position: relative;
}

/* Custom scrollbar for code blocks */
.article-content pre::-webkit-scrollbar {
  height: 6px;
}
.article-content pre::-webkit-scrollbar-track {
  background: transparent;
}
.article-content pre::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
.article-content pre::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.article-content pre code {
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  color: #e2e2e9;
  text-shadow: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.article-content :not(pre) > code {
  font-family: 'DM Mono', monospace;
  font-size: 0.88rem;
  padding: 0.2rem 0.5rem;
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.15);
  color: var(--accent);
  border-radius: 6px;
  word-break: break-all;
}

/* Code block language badge & copy button */
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #08080c;
  padding: 0.6rem 1.5rem;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border: 1px solid var(--border);
  border-bottom: none;
  margin-top: 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--text3);
}

.code-header + pre {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.copy-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text2);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108, 99, 255, 0.05);
}

.copy-btn.copied {
  color: var(--accent3);
  border-color: var(--accent3);
  background: rgba(67, 233, 123, 0.05);
}

/* Share Widgets */
.article-share-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
  margin: 4rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.share-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.share-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text2);
  text-decoration: none;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.share-btn i {
  font-size: 0.95rem;
}

.share-btn:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.2);
}

.share-btn.twitter:hover {
  background: #1da1f2;
  border-color: #1da1f2;
}

.share-btn.linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
}

.share-btn.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.share-btn.reddit:hover {
  background: #ff4500;
  border-color: #ff4500;
}

.share-btn.quora:hover {
  background: #b92b27;
  border-color: #b92b27;
}

.share-btn.dev:hover {
  background: #000000;
  border-color: #333333;
}

.share-btn.copy:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.share-btn.copy.copied {
  color: var(--accent3) !important;
  border-color: var(--accent3) !important;
  background: rgba(67, 233, 123, 0.05);
}

/* Table styles */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.article-content th, .article-content td {
  border: 1px solid var(--border);
  padding: 0.9rem 1.2rem;
  text-align: left;
}

.article-content th {
  background: rgba(108, 99, 255, 0.04);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

.article-content tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

/* Floating Share Widget on Large Screens */
@media (min-width: 1200px) {
  .floating-share-widget {
    position: fixed;
    left: calc(50% - 530px);
    top: 30%;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 10;
    animation: fadeIn 1s 0.5s ease forwards;
    opacity: 0;
  }
  
  .floating-share-widget .share-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
  }
  
  .floating-share-widget .share-btn span {
    display: none;
  }
}

@media (max-width: 1200px) {
  .floating-share-widget {
    display: none;
  }
}

/* ==========================================
   RESPONSIVE — TABLET (max 900px)
   ========================================== */
@media (max-width: 900px) {
  .blog-container { padding: 2rem 2.5rem 6rem; }
  .blog-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .article-container { padding: 8rem 2rem 6rem; }
}

/* ==========================================
   RESPONSIVE — MOBILE (max 768px)
   ========================================== */
@media (max-width: 768px) {
  .blog-hero { padding: 7rem 1.5rem 3rem; min-height: auto; }
  .blog-hero .section-title { font-size: clamp(2rem, 8vw, 3rem); }
  .blog-hero-desc { font-size: 1rem; }
  .blog-container { padding: 1.5rem 1.2rem 5rem; }
  .blog-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .blog-card { padding: 1.6rem; }
  .blog-card-title { font-size: 1.2rem; }
  .article-container { padding: 8.5rem 1.2rem 5rem; }
  .article-header { margin-bottom: 1.8rem; text-align: left; }
  .article-back-link { margin-bottom: 1.5rem; }
  .article-meta { flex-wrap: wrap; justify-content: flex-start; gap: 0.6rem 1rem; font-size: 0.72rem; margin-bottom: 1rem; }
  .article-title { font-size: clamp(1.65rem, 6.5vw, 2.4rem); text-align: left; margin-bottom: 1.2rem; }
  .article-tags { justify-content: flex-start; margin-bottom: 1.5rem; }
  .article-cover-container { margin-bottom: 2rem; border-radius: 12px; }
  .article-content { font-size: 1rem; line-height: 1.8; }
  .article-content h2 { font-size: clamp(1.3rem, 5vw, 1.75rem); margin: 2.5rem 0 1rem; }
  .article-content h3 { font-size: clamp(1.1rem, 4vw, 1.4rem); margin: 1.8rem 0 0.8rem; }
  .article-content p { margin-bottom: 1.4rem; }
  .article-content pre { padding: 1rem 1.1rem; border-radius: 8px; font-size: 0.82rem; margin: 1.5rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .article-content pre code { font-size: 0.82rem; white-space: pre; }
  .code-header { padding: 0.5rem 1rem; border-top-left-radius: 8px; border-top-right-radius: 8px; font-size: 0.68rem; margin-top: 1.5rem; }
  .article-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 0.85rem; }
  .article-content th, .article-content td { padding: 0.65rem 0.9rem; min-width: 120px; }
  .article-share-section { padding: 2rem 0; margin: 2.5rem 0; }
  .share-buttons { gap: 0.7rem; justify-content: center; }
  .share-btn { padding: 0.6rem 1rem; font-size: 0.82rem; gap: 0.4rem; }
}

/* ==========================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ========================================== */
@media (max-width: 480px) {
  .blog-hero { padding: 6.5rem 1rem 2.5rem; }
  .blog-container { padding: 1rem 1rem 4rem; }
  .blog-card { padding: 1.3rem; border-radius: 12px; }
  .blog-card-title { font-size: 1.1rem; }
  .blog-card-excerpt { font-size: 0.9rem; }
  .article-container { padding: 8rem 1rem 4rem; }
  .article-title { font-size: clamp(1.4rem, 7vw, 1.9rem); }
  .article-meta { font-size: 0.68rem; gap: 0.4rem 0.8rem; }
  .article-tag { font-size: 0.68rem; padding: 0.2rem 0.6rem; }
  .share-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; width: 100%; }
  .share-btn { justify-content: center; width: 100%; padding: 0.65rem 0.5rem; font-size: 0.8rem; }
  .article-content :not(pre) > code { word-break: break-word; font-size: 0.82rem; }
  .article-content pre { padding: 0.9rem; font-size: 0.78rem; border-radius: 6px; }
  .article-content pre code { font-size: 0.78rem; }
  .code-header { font-size: 0.65rem; padding: 0.4rem 0.8rem; }
  .article-share-section { padding: 1.5rem 0; margin: 2rem 0; }
  .share-title { font-size: 1rem; }
}

