/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Dark professional theme */
  --background: hsl(222, 47%, 6%);
  --foreground: hsl(210, 40%, 96%);
  --card: hsl(222, 47%, 8%);
  --card-foreground: hsl(210, 40%, 96%);
  --primary: hsl(199, 89%, 48%);
  --primary-foreground: hsl(222, 47%, 6%);
  --secondary: hsl(222, 30%, 14%);
  --secondary-foreground: hsl(210, 40%, 96%);
  --muted: hsl(222, 30%, 12%);
  --muted-foreground: hsl(215, 20%, 55%);
  --border: hsl(222, 30%, 18%);
  --radius: 0.75rem;
  --glow-primary: 0 0 40px hsla(199, 89%, 48%, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.125rem;
}

p {
  color: var(--muted-foreground);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .hero-content {
    flex-direction: row;
    gap: 3rem;
  }
}

.avatar-wrapper {
  position: relative;
  animation: fadeIn 0.6s ease-out forwards;
}

.avatar-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: hsla(199, 89%, 48%, 0.2);
  filter: blur(2rem);
  animation: glowPulse 3s ease-in-out infinite;
}

.avatar {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  border: 2px solid hsla(199, 89%, 48%, 0.3);
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 600;
  color: var(--primary);
  position: relative;
  overflow: hidden;
}

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

@media (min-width: 768px) {
  .avatar {
    width: 12rem;
    height: 12rem;
    font-size: 3.5rem;
  }
}

.hero-text {
  text-align: center;
  space-y: 1rem;
}

@media (min-width: 768px) {
  .hero-text {
    text-align: left;
  }
}

.hero-subtitle {
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.1s forwards;
}

.hero-title {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.1s forwards;
}

.hero-stack {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--muted-foreground);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

.hero-description {
  max-width: 36rem;
  line-height: 1.7;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

/* Sections */
section {
  padding: 5rem 1.5rem;
}

.bg-card-half {
  background: hsla(222, 47%, 8%, 0.5);
}

/* Card styles */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

@media (min-width: 768px) {
  .card {
    padding: 3rem;
  }
}

.card p {
  line-height: 1.7;
}

.card p + p {
  margin-top: 1rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  gap: 1.5rem;
}

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

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s ease;
}

.service-card:hover {
  border-color: hsla(199, 89%, 48%, 0.5);
}

.service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: hsla(199, 89%, 48%, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: background-color 0.3s ease;
}

.service-card:hover .service-icon {
  background: hsla(199, 89%, 48%, 0.2);
}

.service-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Tech Stack */
.tech-categories {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tech-category h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  padding: 0.375rem 0.75rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: hsla(210, 40%, 96%, 0.8);
  transition: border-color 0.3s ease;
}

.tech-tag:hover {
  border-color: hsla(199, 89%, 48%, 0.5);
}

/* Contact */
.contact-intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-intro h2 {
  margin-bottom: 1rem;
}

.contact-intro p {
  max-width: 36rem;
  margin: 0 auto;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .contact-links {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--foreground);
  transition: all 0.3s ease;
}

.contact-link:hover {
  border-color: hsla(199, 89%, 48%, 0.5);
  color: var(--primary);
}

.contact-link svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.contact-location {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
}

.contact-location svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

/* Footer */
footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes glowPulse {
  0%, 100% {
    box-shadow: var(--glow-primary);
  }
  50% {
    box-shadow: 0 0 60px hsla(199, 89%, 48%, 0.25);
  }
}
