/* ============================================================
   Amruta Patwardhan Portfolio — Antigravity-Inspired Styles
   ============================================================ */

/* ── CSS Variables ── */
:root {
  /* Backgrounds */
  --bg-primary: #050816;
  --bg-secondary: #0a0f1e;
  --bg-tertiary: #0f1629;
  --bg-card: rgba(15, 22, 41, 0.6);
  --bg-card-hover: rgba(20, 30, 55, 0.8);

  /* Accent Gradients */
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --accent-4: #a855f7;
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
  --gradient-text: linear-gradient(135deg, #60a5fa, #a78bfa, #34d399);
  --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4));

  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #a78bfa;

  /* Borders */
  --border-color: rgba(148, 163, 184, 0.08);
  --border-glow: rgba(139, 92, 246, 0.3);

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

  /* Sizing */
  --nav-height: 72px;
  --container-max: 1200px;
  --section-padding: 140px;
  --border-radius: 16px;
  --border-radius-sm: 10px;
  --border-radius-xs: 6px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

::selection {
  background: rgba(139, 92, 246, 0.35);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

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

strong {
  color: #e2e8f0;
  font-weight: 600;
}

/* ── Custom Cursor ── */
.cursor {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10001;
  mix-blend-mode: difference;
  transition: transform 0.1s ease;
}

.cursor-follower {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(139, 92, 246, 0.5);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.3s ease,
    height 0.3s ease,
    border-color 0.3s ease;
}

.cursor-follower.hovering {
  width: 56px;
  height: 56px;
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.06);
}

/* ── Particle Canvas ── */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Noise Overlay ── */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.scrolled {
  border-bottom: 1px solid var(--border-color);
}

.nav.scrolled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 22, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: -1;
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color 0.3s;
  min-width: 180px;
  display: inline-block;
}

.logo-bracket {
  color: var(--accent-2);
}

.nav-logo:hover {
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--border-radius-xs);
  transition: color 0.3s, background 0.3s;
  letter-spacing: 0.01em;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.06);
}

.nav-link--cta {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-link--cta:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.4);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── HERO SECTION ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 80%);
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 5;
  padding: var(--nav-height) 24px 0;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  font-size: 0.8rem;
  color: var(--text-accent);
  margin-bottom: 40px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  animation: float-subtle 4s ease-in-out infinite;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
  }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 40%, #60a5fa 70%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotateX(-15deg);
  animation: heroFallback 0.8s ease-out 2.5s forwards;
}

@keyframes heroFallback {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  color: var(--text-accent);
  margin-bottom: 28px;
  min-height: 1.7em;
  letter-spacing: 0.02em;
}

.hero-role-cursor {
  display: inline-block;
  animation: blink-cursor 0.8s step-end infinite;
  color: var(--accent-1);
  font-weight: 300;
}

@keyframes blink-cursor {
  50% {
    opacity: 0;
  }
}

.hero-description {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-2), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  50.01% {
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ── Orbital Elements ── */
.hero-orbitals {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orbital {
  position: absolute;
  border-radius: 50%;
}

.orbital--1 {
  width: 400px;
  height: 400px;
  top: 10%;
  right: -100px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  animation: float-orbital 8s ease-in-out infinite;
}

.orbital--2 {
  width: 300px;
  height: 300px;
  bottom: 15%;
  left: -80px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  animation: float-orbital 10s ease-in-out infinite reverse;
}

.orbital--3 {
  width: 200px;
  height: 200px;
  top: 30%;
  left: 15%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
  animation: float-orbital 6s ease-in-out infinite 1s;
}

.orbital--ring {
  width: 500px;
  height: 500px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(99, 102, 241, 0.06);
  animation: spin-slow 30s linear infinite;
}

@keyframes float-orbital {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -20px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 15px) scale(0.95);
  }
}

@keyframes spin-slow {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes float-subtle {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-body);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.25),
    0 0 0 1px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-ghost {
  background: rgba(148, 163, 184, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.2);
  transform: translateY(-2px);
}

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

/* ── Sections ── */
.section {
  position: relative;
  z-index: 2;
  padding: var(--section-padding) 0;
}

.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

.section-header {
  margin-bottom: 80px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 100px;
  background: rgba(139, 92, 246, 0.05);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

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

.highlight-text {
  color: var(--accent-3);
  font-weight: 600;
}

/* ── About Section ── */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: start;
}

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

.about-lead {
  font-size: 1.15rem !important;
  color: var(--text-primary) !important;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity 0.4s;
}

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
}

.stat-card:hover::before {
  opacity: 0.06;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.stat-suffix {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-3);
  position: relative;
  z-index: 1;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
}

/* ── Skills Section ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-card {
  padding: 40px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left;
}

.skill-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

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

.skill-card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  color: var(--accent-2);
}

.skill-card-icon svg {
  width: 100%;
  height: 100%;
}

.skill-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.skill-tag {
  padding: 5px 14px;
  font-size: 0.78rem;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-accent);
  border: 1px solid rgba(99, 102, 241, 0.12);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.skill-bar {
  height: 3px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 100px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Projects Section ── */
.projects-grid {
  display: grid;
  gap: 20px;
}

.project-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: start;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  cursor: none;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity 0.4s;
}

.project-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

.project-card:hover::after {
  opacity: 0.05;
}

.project-card-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.project-card-content {
  position: relative;
  z-index: 1;
}

.project-card-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: inline-block;
}

.project-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card-tech span {
  padding: 4px 12px;
  font-size: 0.72rem;
  border-radius: 100px;
  background: rgba(139, 92, 246, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.project-card-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.4s;
  position: relative;
  z-index: 2;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.project-card-toggle svg {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card.expanded .project-card-toggle svg {
  transform: rotate(180deg);
}

.project-card.expanded .project-card-toggle {
  color: var(--accent-3);
  background: rgba(6, 182, 212, 0.1);
}

/* Expanded project details */
.project-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  margin-top: 0;
}

.project-card.expanded .project-details {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 24px;
}

.project-details-inner {
  overflow: hidden;
}

.project-details-inner h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.project-details-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-details-inner li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-details-inner li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  top: 2px;
}

/* ── Experience / Timeline ── */
.timeline {
  position: relative;
  padding-left: 48px;
}

.timeline-line {
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-2), rgba(139, 92, 246, 0.1));
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-dot {
  position: absolute;
  left: -44px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-2);
  z-index: 2;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.timeline-card {
  padding: 36px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-card:hover {
  border-color: var(--border-glow);
  transform: translateX(8px);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.timeline-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--accent-3);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 5px 14px;
  background: rgba(99, 102, 241, 0.06);
  border-radius: 100px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  white-space: nowrap;
}

@media (max-width: 360px) {
  .timeline-date {
    white-space: normal;
    border-radius: var(--border-radius-xs);
  }
}

.timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-list li {
  display: block;
  position: relative;
  padding-left: 28px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.timeline-list li svg {
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--accent-3);
}

/* ── Resume Section ── */
.resume-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: -60px;
  margin-bottom: 48px;
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.resume-card {
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: none;
}

.resume-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left;
}

.resume-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  background: var(--bg-card-hover);
}

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

.resume-card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  color: var(--accent-2);
}

.resume-card-icon svg {
  width: 100%;
  height: 100%;
}

.resume-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.resume-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 24px;
}

.resume-card-action {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--accent-1);
  font-weight: 500;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  transition: color 0.3s;
}

.resume-card:hover .resume-card-action {
  color: #818cf8;
}

/* ── Contact Section ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-link:hover {
  border-color: var(--border-glow);
  transform: translateX(8px);
  background: var(--bg-card-hover);
}

.contact-link-icon {
  width: 36px;
  height: 36px;
  color: var(--accent-2);
  flex-shrink: 0;
}

.contact-link-icon svg {
  width: 100%;
  height: 100%;
}

.contact-link-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.contact-link-value {
  display: block;
  font-size: 0.92rem;
  color: var(--text-primary);
}

/* ── Contact Form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 18px 20px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group label {
  position: absolute;
  left: 20px;
  top: 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  padding: 0 4px;
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
  top: -10px;
  left: 16px;
  font-size: 0.72rem;
  color: var(--accent-2);
  background: var(--bg-primary);
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.footer-right {
  display: flex;
  gap: 16px;
}

.footer-right a {
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s;
}

.footer-right a:hover {
  color: var(--accent-1);
  transform: translateY(-2px);
}

/* ── Reveal Animations (initial states) ── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-text {
  opacity: 0;
  transform: translateY(20px);
}

/* ── Responsive ── */

/* Anchor scroll offset for sticky nav */
section[id] {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* ── Large Tablet / Small Desktop (≤1024px) ── */
@media (max-width: 1024px) {
  :root {
    --section-padding: 100px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Show hamburger at 1024px to prevent nav crowding */
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 22, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0s linear 0.5s;
    z-index: 1000;
    visibility: hidden;
    pointer-events: none;
  }

  .nav-links.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0s linear 0s;
  }

  .nav-link {
    font-size: 1.2rem;
    padding: 12px 24px;
  }

  .nav-toggle {
    display: flex;
  }
}

/* ── Tablet Portrait (≤768px) ── */
@media (max-width: 768px) {
  :root {
    --section-padding: 72px;
    --nav-height: 64px;
  }

  body {
    cursor: auto;
  }

  .cursor,
  .cursor-follower {
    display: none !important;
  }

  .nav-inner {
    padding: 0 20px;
  }

  .nav-logo {
    min-width: auto;
    font-size: 1.1rem;
  }

  .section-container {
    padding: 0 20px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-title {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .hero-title {
    font-size: clamp(3rem, 12vw, 5rem);
  }

  .hero-badge {
    margin-bottom: 28px;
    font-size: 0.72rem;
    padding: 6px 16px;
  }

  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 36px;
  }

  .hero-scroll-indicator {
    display: none;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .skill-card {
    padding: 28px 24px;
  }

  .resume-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .resume-card {
    padding: 28px 24px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 20px;
  }

  .project-card-number {
    font-size: 1.8rem;
  }

  .project-card-toggle {
    position: absolute;
    top: 20px;
    right: 16px;
  }

  .timeline {
    padding-left: 32px;
  }

  .timeline-dot {
    left: -28px;
    width: 14px;
    height: 14px;
  }

  .timeline-card {
    padding: 24px 20px;
  }

  .timeline-card-header {
    flex-direction: column;
    gap: 8px;
  }

  .timeline-card h3 {
    font-size: 1.1rem;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .about-text p {
    font-size: 0.95rem;
  }

  .resume-subtitle {
    margin-top: -24px;
    font-size: 0.95rem;
  }

  .contact-lead {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }

  .contact-link {
    padding: 16px 20px;
    gap: 16px;
  }

  .footer-inner {
    padding: 0 20px;
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-right {
    justify-content: center;
  }

  /* Orbital scaling */
  .orbital--1 {
    width: 200px;
    height: 200px;
  }

  .orbital--2 {
    width: 160px;
    height: 160px;
  }

  .orbital--ring {
    width: 280px;
    height: 280px;
  }
}

/* ── Mobile (≤480px) ── */
@media (max-width: 480px) {
  :root {
    --section-padding: 56px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 13vw, 3.5rem);
    margin-bottom: 16px;
  }

  .hero-badge {
    margin-bottom: 20px;
    font-size: 0.65rem;
    padding: 5px 12px;
    gap: 6px;
  }

  .hero-badge-dot {
    width: 6px;
    height: 6px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 20px 16px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .section-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .project-card {
    padding: 20px 16px;
  }

  .project-card-number {
    font-size: 1.5rem;
  }

  .timeline {
    padding-left: 28px;
  }

  .timeline-dot {
    left: -24px;
    width: 12px;
    height: 12px;
  }

  .timeline-card {
    padding: 20px 16px;
  }

  .timeline-list li {
    font-size: 0.85rem;
  }

  .nav-logo {
    font-size: 0.95rem;
  }

  .contact-grid {
    gap: 32px;
  }

  .contact-link {
    padding: 14px 16px;
    gap: 12px;
  }

  .contact-link-icon {
    width: 28px;
    height: 28px;
  }

  .form-group input,
  .form-group textarea {
    padding: 14px 16px;
    font-size: 0.88rem;
  }

  .footer-inner {
    padding: 0 16px;
  }
}

/* ══════════════════════════════════════════════════════════
   LIGHT MODE THEME
   ══════════════════════════════════════════════════════════ */

/* Smooth transition on theme change */
body,
body .nav,
body .nav.scrolled,
body .stat-card,
body .skill-card,
body .project-card,
body .resume-card,
body .timeline-card,
body .contact-link,
body .form-group input,
body .form-group textarea,
body .footer {
  transition: background 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

[data-theme="light"] {
  /* Backgrounds */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.9);

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-accent: #6d28d9;

  /* Borders */
  --border-color: rgba(15, 23, 42, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);

  /* Accent adjustments for readability */
  --accent-1: #4f46e5;
  --accent-2: #7c3aed;
  --accent-3: #0891b2;
  --gradient-text: linear-gradient(135deg, #4f46e5, #7c3aed, #0891b2);
}

[data-theme="light"] body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

[data-theme="light"] strong {
  color: #0f172a;
}

[data-theme="light"] ::selection {
  background: rgba(79, 70, 229, 0.2);
  color: #0f172a;
}

[data-theme="light"] .noise-overlay {
  opacity: 0.01;
}

[data-theme="light"] .nav.scrolled {
  background: rgba(248, 250, 252, 0.88);
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .nav-logo:hover {
  color: #0f172a;
}

[data-theme="light"] .hero-bg-grid {
  background-image:
    linear-gradient(rgba(79, 70, 229, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.04) 1px, transparent 1px);
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #0f172a 0%, #4f46e5 40%, #7c3aed 70%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .orbital--1 {
  background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .orbital--2 {
  background: radial-gradient(circle, rgba(8, 145, 178, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .orbital--3 {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .orbital--ring {
  border-color: rgba(79, 70, 229, 0.06);
}

[data-theme="light"] .hero-badge {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.12);
}

[data-theme="light"] .btn-ghost {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

[data-theme="light"] .section-tag {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.12);
}

[data-theme="light"] .skill-tag {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .skill-bar {
  background: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .project-card-number {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.35), rgba(8, 145, 178, 0.25));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .project-card-tech span {
  background: rgba(124, 58, 237, 0.05);
  border-color: rgba(124, 58, 237, 0.15);
  color: var(--text-secondary);
}

[data-theme="light"] .timeline-date {
  background: rgba(79, 70, 229, 0.05);
  border-color: rgba(79, 70, 229, 0.1);
}

[data-theme="light"] .timeline-dot {
  background: var(--bg-primary);
  border-color: var(--accent-2);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.2);
}

[data-theme="light"] .timeline-line {
  background: linear-gradient(to bottom, var(--accent-2), rgba(124, 58, 237, 0.08));
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

[data-theme="light"] .form-group input:focus+label,
[data-theme="light"] .form-group input:not(:placeholder-shown)+label,
[data-theme="light"] .form-group textarea:focus+label,
[data-theme="light"] .form-group textarea:not(:placeholder-shown)+label {
  background: var(--bg-primary);
}

[data-theme="light"] .footer {
  border-top-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .cursor {
  background: #0f172a;
  mix-blend-mode: normal;
}

[data-theme="light"] .cursor-follower {
  border-color: rgba(79, 70, 229, 0.4);
}

[data-theme="light"] .cursor-follower.hovering {
  border-color: rgba(79, 70, 229, 0.5);
  background: rgba(79, 70, 229, 0.04);
}

/* ── Theme Toggle ── */
.theme-toggle {
  position: relative;
  z-index: 1001;
  margin-left: 12px;
}

.theme-toggle-track {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 100px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-color);
  position: relative;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 100px;
  position: relative;
  z-index: 2;
  transition: color 0.3s;
  padding: 0;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
}

.theme-toggle-btn.active {
  color: var(--text-primary);
}

.theme-toggle-indicator {
  position: absolute;
  width: 32px;
  height: 28px;
  border-radius: 100px;
  background: var(--gradient-primary);
  opacity: 0.15;
  top: 3px;
  left: 3px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.theme-toggle-indicator[data-pos="0"] {
  transform: translateX(0);
}

.theme-toggle-indicator[data-pos="1"] {
  transform: translateX(34px);
}

.theme-toggle-indicator[data-pos="2"] {
  transform: translateX(68px);
}

@media (max-width: 768px) {
  .theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    margin-left: 0;
    z-index: 999;
  }

  .theme-toggle-track {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }
}

/* ── Logo Typing Cursor ── */
.logo-cursor {
  display: inline-block;
  color: var(--accent-1);
  font-weight: 300;
  animation: logoBlink 1s step-end infinite;
  margin-left: 2px;
  vertical-align: text-bottom;
}

@keyframes logoBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}