:root {
  --bg: #0e1116;
  --card: #161b22;
  --card-alt: #1f2630;
  --text: #edf2f7;
  --muted: #a8b3c2;
  --brand: #52d3aa;
  --brand-dark: #2eb38b;
  --line: #2b3441;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 17, 22, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
}
nav a:hover, nav a[aria-current="page"] { color: var(--text); }

.hero {
  padding: 72px 0 38px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.kicker {
  color: var(--brand);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1.1px;
  font-weight: 700;
}

h1, h2, h3 { line-height: 1.2; margin-top: 0; }
h1 { font-size: clamp(1.95rem, 3vw, 3rem); margin-bottom: 12px; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2.1rem); }

.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 65ch;
}

.card,
.services-grid article,
.project {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.project.featured {
  border-color: var(--brand-dark);
  background: linear-gradient(180deg, #182327 0%, #141a21 100%);
}

.project {
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-2px);
  border-color: #3a4768;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.project img,
.project-cover {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0a0e13;
}

.project-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  background: #0a0e13;
}

.project-photos img {
  aspect-ratio: 1 / 1;
}

.project-body {
  padding: 16px;
}

.project-body h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.project-body p {
  margin: 0;
}

.highlight-overlay p,
.project-body p:not(.project-meta) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.project-meta {
  margin-top: 10px !important;
  color: var(--muted);
  font-size: 0.88rem;
}

.section {
  padding: 56px 0;
}

.section.alt {
  background: #11161d;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.services-grid,
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.checks p { margin: 0.35rem 0; color: var(--muted); }

.btn {
  display: inline-block;
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  color: #0d1714;
  background: var(--brand);
}
.btn-primary:hover { background: #66dbb6; }

.btn-secondary {
  color: var(--text);
  background: #26303d;
  border-color: #344153;
}
.btn-secondary:hover { background: #2f3b4b; }

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.contact-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  max-width: 720px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.95rem;
}

input, textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #384556;
  background: #0f141b;
  color: var(--text);
  padding: 11px 12px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--muted);
}

.note { color: var(--muted); margin-top: 16px; }

.lang-switch {
  display: inline-flex;
  gap: 6px;
  margin-left: 14px;
}

.lang-btn {
  background: #202937;
  border: 1px solid #344153;
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 600;
}

.lang-btn.active {
  background: var(--brand);
  color: #0d1714;
  border-color: var(--brand);
}

.controls-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 220px auto;
  gap: 12px;
  margin-bottom: 14px;
  align-items: center;
  background: #121822;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

#reset-filters {
  white-space: nowrap;
}

.highlight-stage {
  position: relative;
  height: min(82vh, 860px);
  min-height: 500px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: #05070b;
}

.highlight-carousel {
  height: 100%;
  display: flex;
  transition: transform 0.55s ease;
}

.highlight-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.highlight-slide video,
.highlight-slide img,
.highlight-video,
.highlight-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #05070b;
}

.highlight-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  padding: clamp(20px, 4vw, 54px);
  background: linear-gradient(180deg, rgba(2, 4, 8, 0) 25%, rgba(2, 4, 8, 0.92) 100%);
}

.highlight-overlay h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4.2vw, 3rem);
}

.highlight-overlay p {
  margin: 0;
  max-width: min(70ch, 92%);
}

.highlight-overlay .btn {
  width: fit-content;
  margin-top: 6px;
}

.highlight-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.highlight-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.highlight-dot.active {
  background: var(--brand);
}

#category-select,
#tool-select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #384556;
  background: #0f141b;
  color: var(--text);
  padding: 11px 12px;
}

.project-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.tag {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.3px;
  color: #a9ffe6;
  background: #193228;
  border: 1px solid #2e6f5a;
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tool-tag {
  background: #1f2334;
  border-color: #3a4768;
  color: #c8d6ff;
  margin-bottom: 0;
}

.btn.small {
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.project-detail-wrap {
  max-width: 980px;
}

.hero-figure {
  margin: 10px 0 14px;
  background: #0a0e13;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.hero-figure img,
.hero-figure video {
  width: 100%;
  max-height: 680px;
  object-fit: contain;
  display: block;
  background: #05070b;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.story-stack {
  display: grid;
  gap: 14px;
  margin: 10px 0 16px;
}

.story-item {
  padding: 12px;
}

.story-image {
  width: 100%;
  max-width: 620px;
  max-height: 620px;
  margin: 0 auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
}

.story-text {
  margin: 10px 2px 2px;
  color: #dce6f2;
  line-height: 1.5;
}

.story-link-wrap {
  margin: 8px 2px 2px;
}

.story-link {
  color: #8be9c8;
  text-decoration: none;
  font-weight: 600;
}

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

.story-video-wrap {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #05070b;
}

.story-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

.thumb-btn {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #11161d;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.thumb-btn img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.project-extra {
  margin-top: 20px;
}

.cta-center {
  justify-content: center;
}

.footer-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-meta a {
  color: #b9f7e3;
  text-decoration: none;
}

.footer-meta a:hover {
  text-decoration: underline;
}

.sponsor-page .project-detail-wrap {
  max-width: 1060px;
}

.sponsor-page .card,
.sponsor-page .hero-figure,
.sponsor-page .sponsor-card {
  border-radius: 18px;
  border-color: #2c3440;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.sponsor-page .hero-figure {
  margin: 14px 0 18px;
}

.sponsor-page .sponsor-offer {
  background: linear-gradient(180deg, #1b2230 0%, #141a23 100%);
}

.sponsor-page .sponsor-offer .btn {
  padding: 12px 18px;
}

.prototype-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prototype-card {
  background: linear-gradient(180deg, #1a212c 0%, #141a23 100%);
  border: 1px solid #2c3440;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.prototype-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.sponsor-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.sponsor-card {
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, #1a212c 0%, #141a23 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: center;
  min-height: 158px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sponsor-card:hover {
  border-color: #76ddbf;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.sponsor-card img {
  width: 100%;
  max-width: 210px;
  max-height: 72px;
  object-fit: contain;
}

.sponsor-card span {
  color: #b8c3d2;
  font-size: 0.9rem;
}

.sponsor-card-text strong {
  font-size: 1.03rem;
  font-weight: 650;
}

@media (max-width: 900px) {
  .hero-grid,
  .services-grid,
  .portfolio-grid,
  .controls-bar,
  .thumb-grid {
    grid-template-columns: 1fr;
  }

  .prototype-grid,
  .sponsor-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-stage {
    height: 72vh;
    min-height: 360px;
  }

  .nav-wrap {
    display: grid;
    gap: 10px;
    padding: 12px 0;
  }

  nav a {
    margin-left: 0;
    margin-right: 12px;
  }
}

@media (max-width: 560px) {
  .prototype-grid,
  .sponsor-wall {
    grid-template-columns: 1fr;
  }
}
