/* ============================================
   Abhi Sachdev - Personal Website
   Glassmorphic Design with Fluid Simulation
   ============================================ */

:root {
  --bg-color: #050505;
  --glass-bg: rgba(20, 20, 20, 0.6);
  --glass-bg-hover: rgba(30, 30, 30, 0.65);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-border-light: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --blur-amount: 40px;
  --blur-nav: 20px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

/* Light Mode */
[data-theme="light"] {
  --bg-color: #f5f5f5;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-bg-hover: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-border-light: rgba(0, 0, 0, 0.05);
  --text-primary: #111111;
  --text-secondary: rgba(0, 0, 0, 0.7);
  --text-muted: rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  height: -webkit-fill-available;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Fluid Simulation Canvas */
#fluid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  z-index: 0;
  pointer-events: none;
  background: var(--bg-color);
}

/* ============================================
   Navigation - Apple-style Liquid Glass
   ============================================ */
.nav-glass {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(var(--blur-nav));
  -webkit-backdrop-filter: blur(var(--blur-nav));
  border: 1px solid var(--glass-border-light);
  border-radius: 100px;
  padding: 8px 16px;
  transition: all 0.3s ease;
}

[data-theme="light"] .nav-glass {
  background: rgba(255, 255, 255, 0.6);
}

.nav-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 8px 16px;
  border-radius: 100px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .nav-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.nav-logo svg {
  width: 22px;
  height: 22px;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 8px 16px;
  border-radius: 100px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.nav-resume {
  border: 1px solid var(--glass-border-light);
}

.nav-resume:hover {
  border-color: var(--glass-border);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* ============================================
   Glass Panel - Core Component
   ============================================ */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}

[data-theme="light"] .glass-panel::before {
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
}

.glass-card {
  background: rgba(30, 30, 30, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s ease;
}

[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.5);
}

.glass-card:hover {
  background: rgba(40, 40, 40, 0.55);
  border-color: var(--glass-border);
  transform: translateY(-2px);
}

[data-theme="light"] .glass-card:hover {
  background: rgba(255, 255, 255, 0.65);
}

/* ============================================
   Main Content Container
   ============================================ */
main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0;
}

.hero-card {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 850px;
  padding: 50px 60px;
}

.hero-photo {
  flex-shrink: 0;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.hero-content {
  flex: 1;
}

.hero-name {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-weight: 300;
}

.social-links {
  display: flex;
  gap: 14px;
}

.social-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border-light);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

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

.social-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--glass-border);
  color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .social-icon {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .social-icon:hover {
  background: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Timeline / Experience Section
   ============================================ */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--glass-border),
    var(--glass-border-light)
  );
}

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

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 28px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--glass-border);
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  background: rgba(255, 255, 255, 0.3);
  border-color: var(--text-primary);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .timeline-item:hover .timeline-dot {
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.timeline-content {
  position: relative;
}

.timeline-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.timeline-date {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.timeline-header-stacked {
  margin-bottom: 8px;
}

.timeline-header-stacked .timeline-company {
  display: block;
  margin-top: 8px;
}

.timeline-role {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.timeline-role h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.timeline-role .timeline-date {
  margin-bottom: 0;
  flex-shrink: 0;
}

/* ============================================
   Tech Stack Section
   ============================================ */
.stack-categories {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.stack-category {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.stack-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: default;
}

[data-theme="light"] .stack-tile {
  background: rgba(0, 0, 0, 0.03);
}

.stack-tile:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .stack-tile:hover {
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.stack-icon {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

[data-theme="light"] .stack-icon {
  background: rgba(0, 0, 0, 0.06);
}

.stack-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

/* ============================================
   Hobbies / Off The Clock Section
   ============================================ */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.hobby-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hobby-image {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border-light);
}

.hobby-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.hobby-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hobby-icon svg {
  width: 50%;
  height: 50%;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.hobby-card:hover .hobby-icon svg {
  color: var(--text-primary);
}

.hobby-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

.currently-listening {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border-light);
}

.spotify-icon {
  width: 20px;
  height: 20px;
  color: #1DB954;
}

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

.listening-track {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 100px;
}

[data-theme="light"] .listening-track {
  background: rgba(0, 0, 0, 0.06);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 40px 0 60px;
}

.footer-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
}

.footer-panel p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.source-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--glass-border-light);
  border-radius: 100px;
  transition: all 0.2s ease;
}

.source-link:hover {
  color: var(--text-primary);
  border-color: var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .nav-glass {
    top: 12px;
    padding: 6px 6px 6px 16px;
  }

  .nav-content {
    gap: 20px;
  }

  .nav-links a {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-card {
    flex-direction: column;
    text-align: center;
    gap: 24px;
    padding: 28px;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .hero-name {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  .social-icon {
    width: 42px;
    height: 42px;
  }

  .social-links {
    justify-content: center;
  }

  .glass-panel {
    padding: 20px;
  }

  .section {
    padding: 30px 0;
  }

  .section-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  .timeline {
    padding-left: 20px;
  }

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

  .timeline-dot {
    left: -18px;
    width: 9px;
    height: 9px;
    top: 20px;
  }

  .timeline-item {
    margin-bottom: 16px;
  }

  .glass-card {
    padding: 16px;
  }

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

  .timeline-header h3 {
    font-size: 0.95rem;
  }

  .timeline-company {
    font-size: 0.8rem;
  }

  .timeline-date {
    font-size: 0.7rem;
    margin-bottom: 4px;
  }

  .timeline-desc {
    font-size: 0.8rem;
  }

  .timeline-role {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .timeline-role h3 {
    font-size: 0.9rem;
  }

  .timeline-role .timeline-date {
    font-size: 0.65rem;
  }

  .timeline-header-stacked .timeline-company {
    margin-top: 4px;
  }

  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .hobby-label {
    font-size: 0.8rem;
  }

  .currently-listening {
    flex-direction: column;
    gap: 8px;
  }

  .footer-panel {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 16px;
  }

  .hero-name {
    font-size: 1.8rem;
  }

  .glass-panel {
    padding: 24px;
    border-radius: var(--radius-md);
  }

  .glass-card {
    padding: 16px;
  }

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

  .stack-tile {
    padding: 14px 10px;
  }
}

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

.hero-card {
  animation: fadeInUp 0.8s ease-out;
}

.section .glass-panel {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

#about .glass-panel {
  animation-delay: 0.1s;
}

#stack .glass-panel {
  animation-delay: 0.2s;
}

.footer .glass-panel {
  animation-delay: 0.3s;
}
