/* ============================================
   SUBHAKANT ROUT — Developer Portfolio
   Design System & Component Styles
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Base Colors */
  --bg-primary: #06060e;
  --bg-secondary: #0c0c1a;
  --bg-card: rgba(15, 15, 35, 0.6);
  --bg-card-hover: rgba(20, 20, 50, 0.8);

  /* Accent Gradients */
  --accent-cyan: #00f0ff;
  --accent-violet: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --gradient-primary: linear-gradient(135deg, #00f0ff 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(0,240,255,0.15) 0%, rgba(139,92,246,0.15) 50%, rgba(236,72,153,0.15) 100%);
  --gradient-border: linear-gradient(135deg, rgba(0,240,255,0.4) 0%, rgba(139,92,246,0.4) 50%, rgba(236,72,153,0.4) 100%);

  /* Text Colors */
  --text-primary: #e8e8f0;
  --text-secondary: #9ca3b0;
  --text-muted: #6b7280;
  --text-accent: #00f0ff;

  /* Glass */
  --glass-bg: rgba(15, 15, 35, 0.55);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: 20px;

  /* Spacing */
  --section-padding: 120px 0;
  --container-max: 1200px;
  --container-padding: 0 24px;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-glow-cyan: 0 0 30px rgba(0, 240, 255, 0.15);
  --shadow-glow-violet: 0 0 30px rgba(139, 92, 246, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
}

/* --- 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-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

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

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

::selection {
  background: rgba(0, 240, 255, 0.3);
  color: #fff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
  border-radius: var(--radius-full);
}

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

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

/* --- Section Base --- */
.section {
  padding: var(--section-padding);
  position: relative;
  z-index: 1;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  display: inline-block;
}

.section__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.section__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

.section__header {
  text-align: center;
  margin-bottom: 72px;
}

.section__header .section__subtitle {
  margin: 0 auto;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-medium);
}

.nav.scrolled {
  background: rgba(6, 6, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav__logo span {
  -webkit-text-fill-color: var(--text-muted);
  opacity: 0.6;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: var(--transition-medium);
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__cta {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: #0a0a0f;
  transition: var(--transition-medium);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.nav__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.35);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.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 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__text {
  position: relative;
  z-index: 2;
}

.hero__greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeInUp 0.6s 0.2s forwards;
}

.hero__name {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeInUp 0.6s 0.4s forwards;
}

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

.hero__role {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
  min-height: 2em;
  opacity: 0;
  animation: fadeInUp 0.6s 0.6s forwards;
}

.hero__role .typed-cursor {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background: var(--accent-cyan);
  margin-left: 4px;
  animation: blink 1s infinite;
  vertical-align: text-bottom;
}

.hero__description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 520px;
  opacity: 0;
  animation: fadeInUp 0.6s 0.8s forwards;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.6s 1s forwards;
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeInUp 0.8s 0.6s forwards;
}

.hero__avatar-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
}

.hero__avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: var(--gradient-primary);
  animation: rotate 8s linear infinite;
  opacity: 0.6;
}

.hero__avatar-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg-primary);
}

.hero__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 4px solid var(--bg-primary);
}

.hero__avatar-glow {
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
  z-index: 0;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeInUp 0.6s 1.2s forwards;
  opacity: 0;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--gradient-primary);
  color: #0a0a0f;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.35);
}

.btn--outline {
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.03);
}

.btn--outline:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.05);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-cyan);
}

.btn__icon {
  width: 18px;
  height: 18px;
}

/* --- About Section --- */
.about {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 240, 255, 0.02) 50%, transparent 100%);
}

.about__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about__text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.about__text p {
  margin-bottom: 20px;
}

.about__text strong {
  color: var(--text-primary);
  font-weight: 600;
}

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

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
}

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

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.2);
  box-shadow: var(--shadow-glow-cyan);
}

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

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

.stat-card__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

/* --- Skills Section --- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 28px 16px;
  text-align: center;
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-medium);
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 240, 255, 0.2);
  box-shadow: var(--shadow-glow-cyan);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card__icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}

.skill-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-card__level {
  margin-top: 10px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-card__level-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card.in-view .skill-card__level-bar {
  width: var(--level);
}

/* --- Projects Section --- */
.projects {
  background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.02) 50%, transparent 100%);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--gradient-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: var(--transition-medium);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow-violet);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.project-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.project-card__links {
  display: flex;
  gap: 12px;
}

.project-card__link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.project-card__link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.05);
}

.project-card__link svg {
  width: 18px;
  height: 18px;
}

.project-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.project-card__description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  flex-grow: 1;
}

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

.project-card__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(0, 240, 255, 0.06);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.12);
  transition: var(--transition-fast);
}

.project-card:hover .project-card__tag {
  background: rgba(0, 240, 255, 0.1);
}

/* --- Experience / Timeline Section --- */
.experience {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 240, 255, 0.02) 50%, transparent 100%);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-cyan) 0%, var(--accent-violet) 50%, var(--accent-pink) 100%);
  opacity: 0.3;
}

.timeline__item {
  position: relative;
  padding-left: 72px;
  padding-bottom: 56px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: 16px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
  z-index: 1;
  transition: var(--transition-medium);
}

.timeline__item:hover .timeline__dot {
  background: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
}

.timeline__card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: var(--transition-medium);
}

.timeline__item:hover .timeline__card {
  border-color: rgba(0, 240, 255, 0.15);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateX(4px);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.timeline__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.timeline__subtitle {
  font-size: 0.9rem;
  color: var(--accent-violet);
  font-weight: 500;
  margin-bottom: 12px;
}

.timeline__description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Contact Section --- */
.contact {
  background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.03) 50%, transparent 100%);
}

.contact__content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

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

.contact__text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 48px;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-medium);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

.contact__link:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

.contact__link svg {
  width: 20px;
  height: 20px;
}

/* --- Footer --- */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

.footer__text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__text span {
  color: var(--accent-pink);
}

.footer__copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.6;
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Keyframes --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero__visual {
    order: -1;
  }

  .hero__avatar-wrapper {
    width: 260px;
    height: 260px;
  }

  .hero__description {
    margin: 0 auto 36px;
  }

  .hero__actions {
    justify-content: center;
  }

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

  .projects__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(6, 6, 14, 0.97);
    backdrop-filter: blur(30px);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 40px 40px;
    gap: 24px;
    transition: var(--transition-medium);
    border-left: 1px solid var(--glass-border);
  }

  .nav__links.open {
    right: 0;
  }

  .nav__toggle {
    display: flex;
  }

  .hero__name {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero__avatar-wrapper {
    width: 200px;
    height: 200px;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .skill-card {
    padding: 20px 12px;
  }

  .skill-card__icon {
    font-size: 1.8rem;
  }

  .timeline::before {
    left: 16px;
  }

  .timeline__item {
    padding-left: 56px;
  }

  .timeline__dot {
    left: 8px;
    width: 16px;
    height: 16px;
  }

  .timeline__card {
    padding: 24px;
  }

  .hero__scroll-indicator {
    display: none;
  }
}

@media (max-width: 480px) {
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .contact__links {
    flex-direction: column;
    align-items: center;
  }
}
