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

:root {
  --color-bg: #f8fafc;
  --color-bg-card: #ffffff;
  --color-text: #0f172a;
  --color-text-light: #475569;
  --color-text-muted: #94a3b8;
  --color-accent: #6366f1;
  --color-accent-secondary: #8b5cf6;
  --color-accent-light: #eef2ff;
  --color-border: #e2e8f0;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 800px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.75rem;
  --spacing-lg: 3.5rem;
  --spacing-xl: 6rem;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

[data-theme="dark"] {
  --color-bg: #0f172a;
  --color-bg-card: #1e293b;
  --color-text: #f1f5f9;
  --color-text-light: #cbd5e1;
  --color-text-muted: #64748b;
  --color-accent: #22d3ee;
  --color-accent-secondary: #06b6d4;
  --color-accent-light: rgba(34, 211, 238, 0.1);
  --color-border: #334155;
  --gradient-primary: linear-gradient(135deg, #22d3ee 0%, #06b6d4 50%, #0891b2 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.4), 0 8px 10px -6px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.15);
}

[data-theme="dark"] html,
html[data-theme="dark"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='%2322d3ee'/%3E%3Ccircle cx='12' cy='12' r='4' fill='%230f172a'/%3E%3C/svg%3E") 12 12, auto;
}

[data-theme="dark"] a,
[data-theme="dark"] button,
[data-theme="dark"] [role="button"],
[data-theme="dark"] input[type="submit"],
[data-theme="dark"] .nav-link,
[data-theme="dark"] .nav-toggle,
[data-theme="dark"] .theme-toggle {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%2322d3ee'/%3E%3Cstop offset='50%25' stop-color='%2306b6d4'/%3E%3Cstop offset='100%25' stop-color='%230891b2'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='12' fill='url(%23g)'/%3E%3Ccircle cx='14' cy='14' r='5' fill='%230f172a'/%3E%3C/svg%3E") 14 14, pointer;
}

[data-theme="dark"] .nav {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] .motorcycle,
[data-theme="dark"] .car,
[data-theme="dark"] .dino {
  filter: drop-shadow(0 2px 4px rgba(34, 211, 238, 0.2));
}

[data-theme="dark"] li::before {
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

[data-theme="dark"] h2 {
  border-color: rgba(34, 211, 238, 0.1);
}

[data-theme="dark"] h4:hover {
  border-color: rgba(34, 211, 238, 0.2);
}

[data-theme="dark"] h3 a:hover {
  border-color: rgba(34, 211, 238, 0.2);
}

[data-theme="dark"] em {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

[data-theme="dark"] .social-links a:hover {
  box-shadow: var(--shadow-lg), 0 0 20px rgba(34, 211, 238, 0.4);
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='%236366f1'/%3E%3Ccircle cx='12' cy='12' r='4' fill='white'/%3E%3C/svg%3E") 12 12, auto;
}

/* Pointer cursor for interactive elements */
a, button, [role="button"], input[type="submit"], .nav-link, .nav-toggle {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%236366f1'/%3E%3Cstop offset='50%25' stop-color='%238b5cf6'/%3E%3Cstop offset='100%25' stop-color='%23a855f7'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='14' cy='14' r='12' fill='url(%23g)'/%3E%3Ccircle cx='14' cy='14' r='5' fill='white'/%3E%3C/svg%3E") 14 14, pointer;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

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

/* Motorcycle Animation */
.motorcycle-container {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 100px;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.motorcycle {
  position: absolute;
  bottom: 0;
  animation: ride 12s linear infinite;
  opacity: 0.8;
  filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.2));
}

.motorcycle img {
  height: 2.5rem;
  width: auto;
}

.car {
  position: absolute;
  bottom: 0;
  animation: ride 8s linear infinite;
  animation-delay: 6s;
  opacity: 0.8;
  filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.2));
  right: -150px;
}

.car img {
  height: 2.5rem;
  width: auto;
}

.dino {
  position: absolute;
  bottom: 0;
  animation: ride 10s linear infinite, walk 0.15s ease-in-out infinite;
  animation-delay: 3s, 0s;
  opacity: 0.8;
  filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.2));
  right: -150px;
  transform-origin: bottom center;
}

.dino img {
  height: 3rem;
  width: auto;
}


@keyframes walk {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(-3deg);
  }
  75% {
    transform: translateY(-8px) rotate(3deg);
  }
}

@keyframes ride {
  0% {
    right: -150px;
  }
  100% {
    right: 100%;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .motorcycle {
    animation: none;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Mobile - faster animations */
@media (max-width: 640px) {
  .motorcycle {
    animation: ride 6s linear infinite;
  }

  .motorcycle img {
    height: 2rem;
  }

  .car {
    animation: ride 4s linear infinite;
    animation-delay: 3s;
  }

  .car img {
    height: 2rem;
  }

  .dino {
    animation: ride 5s linear infinite, walk 0.12s ease-in-out infinite;
    animation-delay: 1.5s, 0s;
  }

  .dino img {
    height: 2.5rem;
  }


  .motorcycle-container {
    height: 60px;
    bottom: 5px;
  }
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-light);
  font-size: 1.05rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition-fast);
  font-weight: 500;
}

a:hover {
  color: var(--color-accent-secondary);
}

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

ul, ol {
  margin-left: 0;
  margin-bottom: var(--spacing-md);
  list-style: none;
}

li {
  margin-bottom: 0.85rem;
  color: var(--color-text-light);
  padding-left: 1.75rem;
  position: relative;
  font-size: 1.05rem;
}

li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  background: var(--gradient-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: var(--spacing-lg) 0;
}

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

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-light);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--color-text);
  background: var(--color-bg-card);
  box-shadow: var(--shadow-sm);
}

.nav-link.active {
  color: var(--color-accent);
  background: var(--color-accent-light);
  font-weight: 600;
}

.nav-link i {
  opacity: 0.5;
  margin-left: 0.25rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-text);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-toggle:hover {
  background: var(--color-bg-card);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  font-size: 1rem;
  color: var(--color-text-light);
  padding: 0.5rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.theme-toggle:hover {
  background: var(--color-bg-card);
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.theme-toggle .fa-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
  display: inline;
}

/* Main Content */
.main {
  min-height: calc(100vh - 200px);
  padding: var(--spacing-xl) 0;
}

/* Nav avatar */
.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-accent);
}

/* Hero Section - First h1 */
h1:first-of-type {
  font-size: 4.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-md);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

/* Clip-path reveal for hero h1 */
.main .container > h1:first-of-type {
  clip-path: inset(0 100% 0 0);
  animation: clipReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
  opacity: 1;
  transform: none;
  transition: none;
}

@keyframes clipReveal {
  to {
    clip-path: inset(0 0% 0 0);
  }
}

/* Section Headers - h2 becomes pill badges */
h2 {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  margin-bottom: var(--spacing-md);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

/* Project Cards — Sticky Stack */
.project-card {
  position: sticky;
  top: calc(60px + var(--index, 0) * 25px);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.5rem 2rem;
  margin-bottom: 1.5rem;
  min-height: 200px;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease, opacity 0.6s ease;
  z-index: var(--index, 0);
  overflow: hidden;
}

.project-card::before {
  display: none;
}

.project-card:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.project-card h4 {
  margin-top: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  border: none;
  overflow: visible;
  font-size: 1.35rem;
  position: static;
}

.project-card h4::before {
  display: none;
}

.project-card h4:hover {
  box-shadow: none;
  transform: none;
  border-color: transparent;
}

.project-card h4 + p,
.project-card h4 + p + p {
  padding: 0;
}

[data-theme="dark"] .project-card:hover {
  border-color: rgba(34, 211, 238, 0.2);
}

/* About Section — Contains sticky cards so they un-stick before projects */
.about-section {
  position: relative;
  z-index: 1;
}

/* Projects Section — Full-bleed horizontal scroll */
.projects-section {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-top: var(--spacing-lg);
  z-index: 2;
  background: var(--color-bg);
}

.section-divider {
  text-align: center;
  padding: 0 2rem;
  flex-shrink: 0;
}

.section-divider h2 {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: -0.03em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border: none;
  padding: 0;
  border-radius: 0;
  margin-bottom: 0.5rem;
}

.section-divider p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* Filter pills */
.filter-pills {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.filter-pill {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-light);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 0.45rem 1rem;
  border-radius: 50px;
  transition: all 0.25s ease;
}

.filter-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-pill.active {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

/* Filtered-out cards */
.hscroll-track .project-card.filtered-out {
  display: none;
}

.hscroll-outer {
  position: relative;
}

.hscroll-inner {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.hscroll-track {
  display: flex;
  gap: 2rem;
  padding: 0 4rem;
  will-change: transform;
}

.hscroll-track .project-card {
  position: relative;
  top: auto;
  flex: 0 0 380px;
  min-height: 280px;
  z-index: auto;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

.hscroll-track .project-card.visible {
  opacity: 1;
  transform: translateX(0);
}

.hscroll-track .project-card strong {
  color: var(--color-accent);
  font-weight: 600;
}

.hscroll-track .project-card > :last-child {
  margin-top: auto;
}

.hscroll-track .project-card em {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  display: block;
}

.hscroll-track .project-card a[href*="arvindc.in"] {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  border: 1px solid var(--color-accent);
  transition: all 0.25s ease;
  margin-top: 0.5rem;
}

.hscroll-track .project-card a[href*="arvindc.in"]:hover {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

/* Projects section should not have scroll-reveal animation itself */
.main .container > .projects-section {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Standalone h4 cards (non-project pages) */
h4 {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

h4::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}

h4:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-4px);
}

h4:hover::before {
  opacity: 1;
}

h4 + p {
  padding: 0 var(--spacing-md);
  margin-bottom: var(--spacing-xs);
}

h4 + p + p {
  padding: 0 var(--spacing-md);
  padding-bottom: var(--spacing-md);
}

/* Blog links in h3 */
h3 {
  margin-bottom: var(--spacing-sm);
}

h3 a {
  color: var(--color-text);
  display: block;
  padding: var(--spacing-md);
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

h3 a::after {
  content: '\2192';
  position: absolute;
  right: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  opacity: 0;
  transition: var(--transition);
  font-size: 1.25rem;
  color: var(--color-accent);
}

h3 a:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-4px);
  padding-right: calc(var(--spacing-md) + 2rem);
}

h3 a:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Tech tags */
em {
  font-style: normal;
  display: inline-block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  margin-top: var(--spacing-xs);
  border: 1px solid var(--color-border);
}

/* Back link */
a[href*="Back"], a[href="/blogs/"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-light);
  padding: 0.6rem 1.25rem;
  background: var(--color-bg-card);
  border-radius: 50px;
  border: 1px solid var(--color-border);
  margin-bottom: var(--spacing-lg);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

a[href*="Back"]:hover, a[href="/blogs/"]:hover {
  background: var(--color-bg);
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  text-align: center;
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  margin-top: var(--spacing-sm);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  font-size: 1.3rem;
  color: var(--color-text-light);
  background: var(--color-bg);
  border-radius: 50%;
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.social-links a:hover {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translateY(-5px) scale(1.05);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.4);
}

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

/* Mobile Responsive */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  :root {
    --spacing-xl: 3.5rem;
    --spacing-lg: 2.5rem;
  }

  h1:first-of-type {
    font-size: 2.75rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    flex-direction: column;
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    gap: 0.25rem;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  h4 {
    padding: var(--spacing-sm);
  }

  h4 + p, h4 + p + p {
    padding: 0 var(--spacing-sm);
  }

  .project-card {
    position: relative;
    top: auto;
    min-height: auto;
    padding: var(--spacing-md);
    z-index: auto;
  }

  .projects-section {
    width: auto;
    left: auto;
    margin-left: 0;
  }

  .hscroll-outer {
    height: auto !important;
  }

  .hscroll-inner {
    position: relative;
    top: auto;
    height: auto;
    overflow: visible;
    gap: 1rem;
  }

  .hscroll-track {
    flex-direction: column;
    padding: 0;
    transform: none !important;
  }

  .filter-pills {
    gap: 0.4rem;
  }

  .filter-pill {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }

  .hscroll-track .project-card {
    flex: none;
    width: 100%;
    min-height: auto;
    transform: none;
    opacity: 0;
    transition: opacity 0.6s ease;
  }

  .hscroll-track .project-card.visible {
    transform: none;
  }

}

/* Code blocks */
pre, code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
}

code {
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-weight: 500;
}

pre {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-lg);
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Blockquote */
blockquote {
  position: relative;
  padding: var(--spacing-md);
  padding-left: calc(var(--spacing-md) + 4px);
  margin: var(--spacing-md) 0;
  color: var(--color-text-light);
  font-style: italic;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

blockquote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  border-radius: 4px 0 0 4px;
}

/* Scroll-triggered animations */
.main .container > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.main .container > *.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Disable selection */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-secondary) 100%);
  border-radius: 5px;
  border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-primary);
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
