/* Modern Minimalistic Design */
:root {
  /* Color Palette */
  --primary-color: #1a1a1a;
  --secondary-color: #6b7280;
  --accent-color: #3b82f6;
  --background-color: #ffffff;
  --surface-color: #f8fafc;
  --border-color: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  
  /* Typography */
  --font-serif: 'Crimson Text', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --section-padding: 120px 0;
  --container-max-width: 1200px;
  
  /* Effects */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background-color);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 80px; /* Account for fixed navbar */
}

/* Glass Background Effect */
.glass-background {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 50%, 
    rgba(0, 0, 0, 0.02) 100%);
  pointer-events: none;
  border-radius: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); }

p {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-secondary);
}

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

.section {
  padding: var(--section-padding);
  position: relative;
}

.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  position: relative;
  margin-top: -80px; /* Offset the body padding */
  padding-top: 80px; /* Add it back as padding */
}

.section-content {
  padding: 80px 0;
  background: var(--background-color);
}

.section-alt {
  background: var(--surface-color);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--accent-color);
  background: rgba(59, 130, 246, 0.1);
  text-decoration: none;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.navbar-toggle:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-color);
}

/* Hero Section */
.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem 0;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: var(--surface-color);
  color: var(--text-primary);
}

/* Cards */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(59, 130, 246, 0.2);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

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

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

.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--accent-color);
  border-radius: 50%;
  border: 3px solid var(--background-color);
  box-shadow: 0 0 0 3px var(--accent-color);
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.5rem;
  width: 2px;
  height: calc(100% + 1rem);
  background: var(--border-color);
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-content {
  background: var(--glass-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--accent-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Tech Stack */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.tech-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tech-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  filter: grayscale(100%) opacity(0.7);
  transition: all 0.3s ease;
}

.tech-item:hover img {
  filter: none;
  transform: scale(1.1);
}

/* Newsletter */
.newsletter-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 3rem;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.newsletter-container h3 {
  margin-bottom: 1rem;
}

.newsletter-container p {
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

/* Responsive iframe containers */
.iframe-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.py-1 { padding: 0.5rem 0; }
.py-2 { padding: 1rem 0; }
.py-3 { padding: 1.5rem 0; }
.py-4 { padding: 2rem 0; }
.py-5 { padding: 3rem 0; }

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

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

.animate-pulse {
  animation: pulse 2s infinite;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Desktop navbar adjustments */
@media (min-width: 769px) {
  .navbar-nav {
    display: flex !important;
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    flex-direction: row !important;
    gap: 2rem !important;
  }
  
  .navbar-toggle {
    display: none !important;
  }
}

/* Mobile responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-content {
    padding: 60px 0;
  }
  
  .navbar {
    padding: 0.75rem 0;
  }
  
  .navbar .container {
    justify-content: space-between;
    position: relative;
  }
  
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  .navbar-toggle {
    display: block;
  }
  
  .navbar-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--glass-bg);
    padding: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }
  
  .navbar-nav.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    width: 100%;
  }
  
  .navbar-nav .nav-link:hover {
    background: rgba(59, 130, 246, 0.15);
  }
  
  .social-icons {
    gap: 1rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .newsletter-container {
    padding: 2rem 1.5rem;
  }
  
  .featured-apps {
    flex-direction: column;
    align-items: center;
  }
  
  .music-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
  }
  
  .tech-item {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .card {
    padding: 1rem;
  }
}

/* Smooth scrolling for navigation */
html {
  scroll-behavior: smooth;
}

/* Add some subtle entrance animations */
.section-content > .container > * {
  animation: fadeInUp 0.6s ease-out;
}

.card, .tech-item, .project-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Stagger animations for grid items */
.project-grid > *:nth-child(1) { animation-delay: 0.1s; }
.project-grid > *:nth-child(2) { animation-delay: 0.2s; }
.project-grid > *:nth-child(3) { animation-delay: 0.3s; }
.project-grid > *:nth-child(4) { animation-delay: 0.4s; }

.tech-grid > *:nth-child(1) { animation-delay: 0.1s; }
.tech-grid > *:nth-child(2) { animation-delay: 0.2s; }
.tech-grid > *:nth-child(3) { animation-delay: 0.3s; }
.tech-grid > *:nth-child(4) { animation-delay: 0.4s; }
.tech-grid > *:nth-child(5) { animation-delay: 0.5s; }

/* Improve focus states for accessibility */
.nav-link:focus,
.btn:focus,
.social-icon:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --glass-bg: rgba(30, 41, 59, 0.8);
  }
}