:root {
  --header-height: 80px;
  --container-width: 1200px;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-dark: #1d4ed8;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-dark: #111827;
  --bg: #ffffff;
  --bg-light: #f9fafb;
  --bg-dark: #0f172a;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-bg-dark: rgba(15, 23, 42, 0.95);
  --hover-bg: #f3f4f6;
  --section-pad: 80px;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

/* Dark theme variables */
html.dark {
  --text: #f9fafb;
  --text-light: #d1d5db;
  --text-dark: #f9fafb;
  --bg: #0f172a;
  --bg-light: #1e293b;
  --bg-dark: #0f172a;
  --card-bg: #1e293b;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --border: #374151;
  --border-light: #4b5563;
  --nav-bg: rgba(15, 23, 42, 0.95);
  --hover-bg: #374151;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  padding-top: var(--header-height);
  overflow-x: hidden;
}

.container {
  width: min(100% - 40px, var(--container-width));
  margin-inline: auto;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

html.dark h1, 
html.dark h2, 
html.dark h3, 
html.dark h4 {
  color: var(--text);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* Header & Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  z-index: 1000;
  transition: var(--transition);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Header CTA Button */
.btn-header {
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-header:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

/* Search & Theme Toggle */
.search-form input[type="search"] {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  color: var(--text);
  width: 200px;
  transition: var(--transition);
}

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.theme-toggle {
  width: 56px;
  height: 32px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-light);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.theme-toggle .knob {
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--card-shadow);
  transition: left 0.3s ease;
}

html.dark .theme-toggle .knob {
  left: 28px;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text);
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-title .highlight {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(37, 99, 235, 0.2);
  z-index: -1;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  text-align: center;
  max-width: 120px;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-features {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.service-features li {
  padding: 0.25rem 0;
  color: var(--text-light);
  position: relative;
  padding-left: 1.5rem;
}

.service-features li::before {
  content: '✓';
  color: var(--accent);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.project-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 1;
}

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.project-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 600;
}

.meta-value {
  font-size: 0.875rem;
  color: var(--text);
}

.project-excerpt {
  color: var(--text-light);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-tag {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: auto;
}

.project-thumbs img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.project-thumbs img:hover {
  opacity: 0.8;
}

/* Project Modal */
.project-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.project-modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-dialog {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  width: min(100%, 1000px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: var(--card-shadow-hover);
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--hover-bg);
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.modal-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-gallery img:hover {
  transform: scale(1.02);
}

/* About Section */
.about-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-features {
  margin: 2rem 0;
}

.feature {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.feature-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.feature h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.about-cta {
  font-size: 1.125rem;
  color: var(--text);
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(37, 99, 235, 0.05);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

.about-image {
  position: relative;
}

.image-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow-hover);
}

.placeholder-image {
  background: var(--bg-light);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.125rem;
}

.about-badge {
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  box-shadow: var(--card-shadow);
}

/* Process Section */
.process-section {
  background: var(--bg-light);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.process-step {
  position: relative;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
}

.step-number::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 2rem;
  height: 2px;
  background: var(--border);
  display: none;
}

.process-step:not(:last-child) .step-number::after {
  display: block;
}

.step-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.process-cta {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(37, 99, 235, 0.05);
  border-radius: var(--radius);
}

/* Contact Section */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 2rem;
}

.contact-info h3,
.contact-form-wrapper h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-light);
}

.contact-item a,
.contact-item p {
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--accent);
}

.contact-note {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(37, 99, 235, 0.05);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

/* Forms */
.form-row {
  margin-bottom: 1.5rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row textarea {
  min-height: 150px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.col-span-2 {
  grid-column: span 2;
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.form-status:not(:empty) {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-column h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: var(--accent-light);
  text-decoration: none;
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--text-light);
}

.inline-cta {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.inline-cta:hover {
  border-bottom-color: var(--accent);
}

.section {
  padding: var(--section-pad) 0;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .section-title {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .about-wrapper,
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-inner {
    gap: 1rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .btn-header {
    display: none;
  }
  
  .search-form input[type="search"] {
    width: 150px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  .services-grid,
  .projects-grid,
  .process-steps {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .col-span-2 {
    grid-column: span 1;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 20px, var(--container-width));
  }
  
  .section {
    padding: 60px 0;
  }
  
  .hero {
    padding: 100px 0 60px;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .project-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Touch Device Menu */
html.is-touch .nav-links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--card-shadow);
}

html.is-touch .nav-links.open {
  display: flex;
}

html.is-touch .nav-link {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

html.is-touch .nav-link:hover {
  background: var(--hover-bg);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .navbar,
  .btn-header,
  .theme-toggle,
  .search-form,
  .hero-buttons,
  .contact-form-wrapper,
  .footer {
    display: none !important;
  }
  
  body {
    padding-top: 0;
    background: white;
    color: black;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .section {
    padding: 20px 0;
    break-inside: avoid;
  }
}