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

:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --background: #ffffff;
  --foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Dark mode variables */
[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-hover: #3b82f6;
  --background: #0f172a;
  --foreground: #f8fafc;
  --muted: #1e293b;
  --muted-foreground: #94a3b8;
  --border: #334155;
  --card: #1e293b;
  --card-foreground: #f8fafc;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3),
    0 4px 6px -4px rgb(0 0 0 / 0.3);
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .header {
  background-color: rgba(15, 23, 42, 0.95);
}

.header .container {
  display: flex;
  align-items: center;
  height: 3.5rem;
}

.nav-brand {
  margin-right: 1rem;
}

.brand-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--foreground);
  font-size: 1.125rem;
  transition: color 0.3s ease;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: auto;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme toggle button */
.theme-toggle {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
}

[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.btn-outline:hover {
  background-color: var(--muted);
}

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

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

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero-section {
  padding: 3rem 0 6rem;
}

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

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--foreground);
  transition: color 0.3s ease;
}

.hero-description {
  max-width: 800px;
  font-size: 1.35rem;
  color: var(--muted-foreground);
  margin-bottom: 0.1rem;
  transition: color 0.3s ease;
}
.hero-description2 {
  max-width: 700px;
  font-size: 1rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

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

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

.social-link:hover {
  background-color: var(--muted);
  border-color: var(--primary);
}

/* Sections */
.projects-section,
.tech-section,
.contact-section {
  padding: 3rem 0 6rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.025em;
  color: var(--foreground);
  transition: color 0.3s ease;
}

/* Projects */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.project-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-2px);
}

.project-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: var(--muted);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s;
}

[data-theme="dark"] .project-image img {
  opacity: 0.9;
}

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

[data-theme="dark"] .project-card:hover .project-image img {
  opacity: 1;
}

.project-content {
  padding: 1rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
  transition: color 0.3s ease;
}

.project-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--muted);
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  color: var(--foreground);
  transition: all 0.3s ease;
}

.project-footer {
  padding: 1rem;
  padding-top: 0;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.3s ease;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
}

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

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

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

.tech-category {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--card-foreground);
  transition: color 0.3s ease;
}

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

.skill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  border-radius: 0.375rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

/* Contact */
.contact-content {
  max-width: 32rem;
  margin: 0 auto;
}

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

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
  transition: color 0.3s ease;
}

.form-input,
.form-textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background-color: var(--background);
  color: var(--foreground);
  transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus {
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

.form-textarea {
  min-height: 6rem;
  resize: vertical;
}

.form-message {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
  transition: color 0.3s ease;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  transition: border-color 0.3s ease;
}

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

.footer-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  transition: color 0.3s ease;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Responsive */
@media (min-width: 640px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }

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

@media (max-width: 639px) {
  .nav {
    display: none;
  }

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

  .section-title {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  .hero-section {
    padding: 6rem 0 8rem;
  }

  .projects-section,
  .tech-section,
  .contact-section {
    padding: 6rem 0 8rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.75rem;
  }

  .section-title {
    font-size: 3rem;
  }
}
