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

:root {
  --color-background: #ffffff;
  --color-foreground: #0a0a0a;
  --color-muted: #737373;
  --color-accent: #2563eb;
  --color-secondary-bg: #f5f5f5;
  --color-border: #e5e5e5;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
}

body {
  font-family: var(--font-sans);
  color: var(--color-foreground);
  background-color: var(--color-background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Typography */
.section-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 3rem;
  font-family: var(--font-mono);
}

.text-muted {
  color: var(--color-muted);
}

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

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

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-muted);
  font-family: var(--font-mono);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--color-muted);
  line-height: 1.6;
  max-width: 42rem;
}

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

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

.social-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* About Section */
.about {
  padding: 3rem 1.5rem;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.6;
}

.technologies {
  padding-top: 1.5rem;
}

.tech-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

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

.tag {
  padding: 0.25rem 0.75rem;
  background-color: var(--color-secondary-bg);
  color: var(--color-foreground);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: var(--font-mono);
}

/* Clients Section */
.clients {
  padding: 3rem 1.5rem;
  background-color: rgba(245, 245, 245, 0.3);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: center;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s;
}

.client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.client-logo img {
  max-width: 100%;
  height: auto;
}

/* Projects Section */
.projects {
  padding: 3rem 1.5rem;
}

.projects-grid {
  display: grid;
  gap: 2rem;
}

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

.project-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.external-link {
  color: var(--color-muted);
  transition: color 0.2s;
}

.project-card:hover .external-link {
  color: var(--color-accent);
}

.project-description {
  color: var(--color-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

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

.tag-small {
  padding: 0.125rem 0.5rem;
  background-color: var(--color-secondary-bg);
  color: var(--color-foreground);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

/* Related Projects Section */
.related-projects {
  padding: 3rem 1.5rem;
  background-color: rgba(245, 245, 245, 0.3);
}

.related-grid {
  display: grid;
  gap: 1.5rem;
}

.related-card {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--color-foreground);
  transition: border-color 0.2s;
}

.related-card:hover {
  border-color: var(--color-accent);
}

.related-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.related-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  font-family: var(--font-mono);
}

.arrow-icon {
  color: var(--color-muted);
  transition: all 0.2s;
}

.related-card:hover .arrow-icon {
  color: var(--color-accent);
  transform: translate(2px, -2px);
}

.related-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.related-card:hover .related-title {
  color: var(--color-accent);
}

.related-description {
  color: var(--color-muted);
  line-height: 1.6;
}

/* Contact Section */
.contact {
  padding: 3rem 1.5rem;
}

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

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

.contact-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
}

.contact-description {
  font-size: 1.125rem;
  color: var(--color-muted);
  line-height: 1.6;
  max-width: 42rem;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  font-family: var(--font-sans);
}

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

.btn-primary:hover {
  opacity: 0.9;
}

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

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

.contact-info {
  display: grid;
  gap: 2rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

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

.contact-info-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-link {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--color-accent);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--color-background);
  border-radius: 0.5rem;
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--color-muted);
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--color-foreground);
}

.modal-description {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

/* Form */
.email-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.form-actions .btn-primary {
  flex: 1;
}

/* Responsive Design */
@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

  .hero-description {
    font-size: 1.25rem;
  }

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

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

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

  .contact-buttons {
    flex-direction: row;
  }

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

  .contact-title {
    font-size: 2.25rem;
  }
}

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