/* ==========================================
   ASUTOSH'S PORTFOLIO - DESIGN SYSTEM
   Modern, minimal, personality-driven
   ========================================== */

/* =================== CSS RESET =================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button, input, textarea, select {
  font: inherit;
}

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

/* =================== DESIGN TOKENS =================== */
:root {
  /* Colors - Dark Mode (Primary) */
  --bg: #0a0a0a;
  --surface: #18181b;
  --text: #e4e4e7;
  --muted: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: #27272a;
  --success: #22c55e;
  --warning: #f59e0b;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: clamp(2.5rem, 5vw, 3.75rem);
  
  /* Layout */
  --max-width: 1100px;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  
  /* Transitions */
  --transition: 200ms ease;
}

/* Light Mode */
:root.light {
  --bg: #ffffff;
  --surface: #f9fafb;
  --text: #18181b;
  --muted: #52525b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e4e4e7;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* =================== BASE STYLES =================== */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
}

/* =================== TYPOGRAPHY =================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
}

.lead {
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: 1.7;
}

.muted {
  color: var(--muted);
  font-size: var(--text-sm);
}

/* =================== LAYOUT =================== */
.container {
  width: min(100% - var(--space-lg) * 2, var(--max-width));
  margin-inline: auto;
}

section {
  padding-block: var(--space-3xl);
}

/* =================== BOTTOM DOCK NAV =================== */
.bottom-dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(24, 24, 27, 0.85);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

:root.light .bottom-dock {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.dock-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 1rem;
}

.dock-item:hover,
.dock-item:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  outline: none;
}

:root.light .dock-item:hover,
:root.light .dock-item:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}

.dock-item svg {
  width: 18px;
  height: 18px;
}

.dock-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
  flex-shrink: 0;
}

:root.light .dock-divider {
  background: rgba(0, 0, 0, 0.1);
}

body {
  padding-bottom: 80px;
}

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

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

.btn-ghost {
  background: transparent;
}

/* =================== CARDS =================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* =================== HERO =================== */
.hero {
  padding-block: var(--space-3xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-lg);
  position: relative;
  min-height: 60vh;
}

.hero h1 {
  margin-bottom: var(--space-sm);
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

/* Hero Animated Background */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
              radial-gradient(circle at 70% 70%, rgba(59, 130, 246, 0.06) 0%, transparent 25%);
  animation: bgPulse 15s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-2%, -2%) rotate(3deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-30px) scale(1.1); opacity: 0.9; }
}

/* Low motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-bg::before,
  .hero-bg::after {
    animation: none;
  }
}

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  transform: translateY(-2px);
}

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

/* =================== GRID =================== */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* =================== PROJECT CARDS =================== */
.project-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.project-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.project-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: var(--space-xs);
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.project-card:hover .project-thumbnail img {
  transform: scale(1.05);
}

.project-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: auto;
}

/* =================== TECH STACK =================== */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tech-pill {
  padding: var(--space-xs) var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-sm);
  color: var(--muted);
  transition: all var(--transition);
}

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

/* =================== LINKS =================== */
.link-grid {
  display: grid;
  gap: var(--space-sm);
}

.link-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.link-item:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.link-icon {
  font-size: var(--text-xl);
}

/* =================== FOOTER =================== */
footer {
  padding-block: var(--space-xl);
  border-top: 1px solid var(--border);
  margin-top: var(--space-3xl);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =================== ANIMATIONS =================== */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

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

.slide-up {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease forwards;
}

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

/* Stagger animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* =================== THEME TRANSITION =================== */
.theme-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* =================== ACCESSIBILITY =================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .theme-transition-overlay::before {
    transition-duration: 0.01ms !important;
  }
}

/* =================== AVATAR =================== */
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

/* =================== STATUS BADGE =================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: var(--space-md);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

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

/* =================== PROJECT PLACEHOLDER =================== */
.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface), var(--border));
  color: var(--muted);
  gap: var(--space-xs);
  font-size: var(--text-sm);
}

.project-placeholder .placeholder-icon {
  font-size: 2rem;
  opacity: 0.6;
}

/* =================== SITE FOOTER =================== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-3xl);
  padding-block: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.footer-brand {
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.footer-desc {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.footer-heading {
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-links a {
  color: var(--muted);
  font-size: var(--text-sm);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  gap: var(--space-sm);
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

.footer-socials {
  display: flex;
  gap: var(--space-sm);
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: all var(--transition);
}

.footer-socials a:hover {
  color: var(--text);
  background: var(--surface);
}

.footer-socials svg {
  width: 18px;
  height: 18px;
}

/* =================== BLOG COMING SOON =================== */
.blog-card-teaser {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  opacity: 0.6;
  position: relative;
}

.blog-card-teaser .coming-soon-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =================== UTILITIES =================== */
.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;
}

.text-center {
  text-align: center;
}

.mt-auto {
  margin-top: auto;
}
