:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8fb;
  color: #111827;
  font-size: 16px;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  padding: 5rem 0 4rem;
}

.eyebrow {
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #6366f1;
  font-size: 0.9rem;
  font-weight: 700;
}

h1, h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.75rem, 5vw, 4rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
}

.subtitle {
  max-width: 44rem;
  margin: 1.5rem 0 2rem;
  color: #4b5563;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.95rem 1.65rem;
  text-decoration: none;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.primary {
  background: #4f46e5;
  color: white;
}

.secondary {
  background: rgba(79, 70, 229, 0.1);
  color: #312e81;
}

.section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 1.75rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  width: 100%;
  overflow: hidden;
}

.card-gallery .card-image {
  height: 150px;
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.card p {
  margin: 0 0 1rem;
  color: #4b5563;
  flex: 1;
}

.card .project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.card a {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: opacity 200ms ease;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  transition: background 200ms ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
  left: -4rem;
}

.lightbox-next {
  right: -4rem;
}

.lightbox-counter {
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
  }
  
  .lightbox-prev {
    left: 0.5rem;
  }
  
  .lightbox-next {
    right: 0.5rem;
  }
  
  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .lightbox-counter {
    position: static;
    transform: none;
    margin-top: 1rem;
  }
}

.about-card {
  display: grid;
  gap: 2rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
}

.about-details {
  color: #374151;
  font-size: 1rem;
  display: grid;
  gap: 0.75rem;
}

.footer {
  padding: 2rem 0 3rem;
  color: #6b7280;
  font-size: 0.95rem;
}

code {
  background: #f3f4f6;
  padding: 0.15rem 0.3rem;
  border-radius: 0.35rem;
}

@media (max-width: 640px) {
  .hero {
    padding: 3rem 0 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
