/* Modern Portfolio CSS - Joseph Theuri */

/* CSS Variables */
:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(220, 13%, 18%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(220, 13%, 18%);
  --primary: hsl(263, 70%, 50%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(220, 14%, 96%);
  --secondary-foreground: hsl(220, 13%, 18%);
  --muted: hsl(220, 14%, 96%);
  --muted-foreground: hsl(220, 9%, 46%);
  --accent: hsl(263, 70%, 50%);
  --accent-foreground: hsl(0, 0%, 100%);
  --border: hsl(220, 13%, 91%);
  --input: hsl(220, 13%, 91%);
  --ring: hsl(263, 70%, 50%);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(263, 70%, 50%), hsl(280, 100%, 70%));
  --gradient-secondary: linear-gradient(135deg, hsl(220, 14%, 96%), hsl(0, 0%, 100%));
  --gradient-hero: linear-gradient(135deg, hsl(263, 70%, 50%) 0%, hsl(280, 100%, 70%) 50%, hsl(300, 100%, 80%) 100%);
  --gradient-card: linear-gradient(135deg, hsl(0, 0%, 100%) 0%, hsl(220, 14%, 98%) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 hsl(0, 0%, 0%, 0.05);
  --shadow-md: 0 4px 6px -1px hsl(0, 0%, 0%, 0.1);
  --shadow-lg: 0 10px 15px -3px hsl(0, 0%, 0%, 0.1);
  --shadow-xl: 0 20px 25px -5px hsl(0, 0%, 0%, 0.1);
  --shadow-2xl: 0 25px 50px -12px hsl(0, 0%, 0%, 0.25);
  --shadow-glow: 0 0 20px hsl(263, 70%, 50%, 0.3);
  
  /* Fonts */
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  
  /* Transitions */
  --transition-all: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-transform: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --background: hsl(222, 84%, 5%);
  --foreground: hsl(210, 40%, 98%);
  --card: hsl(222, 84%, 8%);
  --card-foreground: hsl(210, 40%, 98%);
  --primary: hsl(263, 70%, 60%);
  --primary-foreground: hsl(210, 40%, 98%);
  --secondary: hsl(217, 32%, 17%);
  --secondary-foreground: hsl(210, 40%, 98%);
  --muted: hsl(217, 32%, 17%);
  --muted-foreground: hsl(215, 20%, 65%);
  --accent: hsl(263, 70%, 60%);
  --accent-foreground: hsl(210, 40%, 98%);
  --border: hsl(217, 32%, 17%);
  --input: hsl(217, 32%, 17%);
  --ring: hsl(263, 70%, 60%);
  
  /* Dark Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(263, 70%, 60%), hsl(280, 100%, 75%));
  --gradient-secondary: linear-gradient(135deg, hsl(217, 32%, 17%), hsl(222, 84%, 8%));
  --gradient-hero: linear-gradient(135deg, hsl(263, 70%, 60%) 0%, hsl(280, 100%, 75%) 50%, hsl(300, 100%, 85%) 100%);
  --gradient-card: linear-gradient(135deg, hsl(222, 84%, 8%) 0%, hsl(217, 32%, 15%) 100%);
  
  /* Dark Shadows */
  --shadow-sm: 0 1px 2px 0 hsl(0, 0%, 0%, 0.25);
  --shadow-md: 0 4px 6px -1px hsl(0, 0%, 0%, 0.4);
  --shadow-lg: 0 10px 15px -3px hsl(0, 0%, 0%, 0.4);
  --shadow-xl: 0 20px 25px -5px hsl(0, 0%, 0%, 0.4);
  --shadow-2xl: 0 25px 50px -12px hsl(0, 0%, 0%, 0.5);
  --shadow-glow: 0 0 20px hsl(263, 70%, 60%, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.highlight {
  color: var(--primary);
  font-weight: 600;
}

.section-subtitle {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-description {
  color: var(--muted-foreground);
  max-width: 32rem;
  margin: 0 auto 4rem;
  font-size: 1.125rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.75rem;
  transition: var(--transition-all);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  text-align: center;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  transform: translateY(-2px);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition-all);
  background: transparent;
}

.navbar.scrolled {
  background: var(--background);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(9, 9, 11, 0.8);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: none;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
}

.nav-link {
  text-decoration: none;
  color: var(--foreground);
  font-weight: 500;
  transition: var(--transition-all);
  text-transform: capitalize;
}

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

/* Theme Toggle */
.theme-toggle {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--transition-all);
  color: var(--foreground);
  font-size: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--muted);
  color: var(--primary);
  transform: scale(1.05);
}

.theme-toggle i {
  transition: var(--transition-all);
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--foreground);
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.mobile-menu.active {
  display: flex;
}

.mobile-nav-link {
  text-decoration: none;
  color: var(--foreground);
  font-weight: 500;
  padding: 0.5rem 0;
  transition: var(--transition-all);
  text-transform: capitalize;
}

.mobile-nav-link:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  opacity: 0.05;
  animation: gradient 15s ease infinite;
  background-size: 400% 400%;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.floating-elements {
  position: absolute;
  inset: 0;
}

.float-1, .float-2, .float-3 {
  position: absolute;
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.float-1 {
  top: 5rem;
  left: 2.5rem;
  width: 5rem;
  height: 5rem;
  background: hsla(263, 70%, 50%, 0.1);
}

.float-2 {
  bottom: 10rem;
  right: 5rem;
  width: 4rem;
  height: 4rem;
  background: hsla(280, 100%, 70%, 0.1);
  animation-delay: 1s;
}

.float-3 {
  top: 33.333333%;
  right: 25%;
  width: 3rem;
  height: 3rem;
  background: hsla(263, 70%, 50%, 0.05);
  animation-delay: 2s;
}

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

.hero-container {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-content {
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(2.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-greeting {
  display: inline-block;
  background: var(--gradient-primary);
  color: var(--primary-foreground);
  padding: 0.5rem 1.3rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-glow);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

.hero-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.skill-tag {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-all);
  animation: fadeInUp 1s ease-out;
}

.skill-tag:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.skill-tag:nth-child(1) { animation-delay: 0ms; }
.skill-tag:nth-child(2) { animation-delay: 100ms; }
.skill-tag:nth-child(3) { animation-delay: 200ms; }
.skill-tag:nth-child(4) { animation-delay: 300ms; }
.skill-tag:nth-child(5) { animation-delay: 400ms; }
.skill-tag:nth-child(6) { animation-delay: 500ms; }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: pulse 2s ease-in-out infinite;
}

.scroll-indicator a {
  color: var(--muted-foreground);
  font-size: 1.5rem;
  text-decoration: none;
  transition: var(--transition-all);
}

.scroll-indicator a:hover {
  color: var(--primary);
}

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

/* About Section */
.about {
  padding: 5rem 0;
  background: var(--gradient-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.about-image {
  position: relative;
  max-width: 28rem;
  margin: 0 auto;
}

.image-decoration {
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  border-radius: 1rem;
  transform: rotate(6deg);
  opacity: 0.2;
}

.image-decoration-2 {
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  border-radius: 1rem;
  transform: rotate(-3deg);
  opacity: 0.1;
}

.profile-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: var(--shadow-2xl);
  border: none;
  background: var(--gradient-card);
}

.profile-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.about-content {
  max-width: none;
}

.about-text {
  color: var(--muted-foreground);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.about-text p {
  margin-bottom: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Services Section */
.services {
  padding: 5rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr; /* 1 column on mobile */
  gap: 1.5rem;
}

/* Tablet: 2 columns (768px+) */
@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Laptop/Desktop: 3 columns (1024px+) */
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Wide Screens: 6 columns (1440px+) */
@media (min-width: 1440px) {
  .services-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Rest of your existing CSS remains the same */
.service-card {
  background: var(--gradient-card);
  border: none;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-all);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.service-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-xl);
}

.service-icon {
  width: 4rem;
  height: 4rem;
  background: var(--gradient-primary);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-transform);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

.service-icon i {
  color: var(--primary-foreground);
  font-size: 1.5rem;
}

.service-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: var(--transition-all);
}

.service-card:hover .service-title {
  color: var(--primary);
}

.service-description {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Portfolio Section */
.portfolio {
  padding: 5rem 0;
  background: var(--gradient-secondary);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portfolio-card {
  background: var(--card);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-all);
  border: 1px solid var(--border);
}

.portfolio-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-xl);
}

.portfolio-image {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  background: var(--muted);
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.portfolio-description {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-tag {
  background: var(--muted);
  color: var(--muted-foreground);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.portfolio-links {
  display: flex;
  gap: 0.5rem;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-all);
}

.portfolio-link:hover {
  text-decoration: underline;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 1.125rem;
  padding: 2rem;
}

/* Contact Section */
.contact {
  padding: 5rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 64rem;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.contact-text {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 3rem;
  height: 3rem;
  background: var(--gradient-primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.contact-icon i {
  color: var(--primary-foreground);
  font-size: 1.25rem;
}

.contact-label {
  font-weight: 500;
  color: var(--foreground);
}

.contact-value {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: var(--transition-all);
}

.contact-value:hover {
  color: var(--primary);
}

.social-links h4 {
  font-weight: 500;
  margin-bottom: 1rem;
}

.social-buttons {
  display: flex;
  gap: 1rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--foreground);
  text-decoration: none;
  transition: var(--transition-all);
}

.social-btn:hover {
  transform: scale(1.1);
  border-color: var(--primary);
  color: var(--primary);
}

.contact-card {
  background: var(--gradient-card);
  border-radius: 1rem;
  box-shadow: var(--shadow-2xl);
  border: none;
}

.card-content {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-icon {
  width: 5rem;
  height: 5rem;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: var(--shadow-glow);
}

.card-icon i {
  color: var(--primary-foreground);
  font-size: 2rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--muted-foreground);
}

.card-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-buttons .btn {
  width: 100%;
  justify-content: center;
}

.response-time {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.response-time p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Footer */
.footer {
  background: var(--muted);
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-link {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: var(--transition-all);
}

.footer-link:hover {
  color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .stats {
    gap: 1rem;
  }
}