:root {
  color-scheme: dark;
  --bg: #0d1117;
  --bg-soft: #121923;
  --panel: rgba(18, 25, 35, 0.84);
  --panel-solid: #151d29;
  --text: #f4f7fb;
  --muted: #9aa8ba;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #36d6d9;
  --green: #7ce38b;
  --amber: #ffbd59;
  --red: #ff6b6b;
  --blue: #6ca8ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(13, 17, 23, 0.92), var(--bg) 380px),
    radial-gradient(circle at top left, rgba(54, 214, 217, 0.07), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.35rem;
  color: var(--green);
  font-size: 0.92em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-panel,
.project-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.brand {
  display: grid;
  gap: 0.08rem;
  border-radius: 8px;
  padding: 0.52rem 0.75rem;
}

.brand-text {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-role {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  border-radius: 8px;
  padding: 0.35rem;
}

.site-nav a {
  border-radius: 6px;
  padding: 0.48rem 0.72rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  min-height: 380px;
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 54px;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  opacity: 0.34;
}

.hero-content,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-content {
  align-self: center;
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 0.9rem;
  font-size: clamp(1.85rem, 3.2vw, 2.8rem);
  line-height: 1.16;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.58rem;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 600px;
  color: #d5dde8;
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0.72rem 1rem;
  font-weight: 800;
}

.button.primary {
  background: var(--text);
  color: #0c1116;
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.hero-panel {
  align-self: center;
  border-radius: 8px;
  padding: 1rem;
}

.hero-panel div {
  display: grid;
  gap: 0.2rem;
  border-bottom: 1px solid var(--line);
  padding: 0.82rem 0;
}

.hero-panel div:first-child {
  padding-top: 0;
}

.hero-panel div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.panel-label,
.project-type {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

.section {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0;
}

.section-heading {
  display: grid;
  max-width: 720px;
  margin-bottom: 32px;
}

.section-heading p:not(.eyebrow),
.contact-section p,
.capability-item p,
.project-body p {
  color: var(--muted);
}

.section-heading.compact {
  max-width: 560px;
}

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

.project-card {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
}

.project-visual {
  position: relative;
  display: grid;
  min-height: 240px;
  place-items: end start;
  overflow: hidden;
  padding: 1rem;
  isolation: isolate;
}

.project-visual img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-visual::before,
.project-visual::after {
  position: absolute;
  content: "";
  inset: 0;
}

.project-visual::before {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  transform: perspective(480px) rotateX(60deg) translateY(16px);
  transform-origin: bottom;
}

.project-visual:has(img)::before {
  display: none;
}

.project-visual::after {
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.42));
}

.project-visual span {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.38);
  padding: 0.36rem 0.58rem;
  font-size: 0.85rem;
  font-weight: 850;
}

.digital-twin {
  background: linear-gradient(135deg, #133541, #1d684e);
}

.cave {
  background: linear-gradient(135deg, #321e4f, #195a7c);
}

.iot {
  background: linear-gradient(135deg, #343023, #836126);
}

.vr {
  background: linear-gradient(135deg, #172c5c, #6b2937);
}

.fire-training {
  background: linear-gradient(135deg, #3a1f1f, #7b3128);
}

.app-project {
  background: linear-gradient(135deg, #243244, #52636b);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.05rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1rem;
}

.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  color: #dce7f3;
  font-size: 0.78rem;
  font-weight: 700;
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.capability-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 1rem;
  background: var(--bg-soft);
  padding: 1.35rem;
}

.capability-index {
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 850;
}

.video-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 18px;
}

.breadcrumb-button,
.folder-card {
  font: inherit;
}

.breadcrumb-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.45rem 0.72rem;
}

.breadcrumb-button:hover {
  border-color: rgba(54, 214, 217, 0.58);
  background: rgba(54, 214, 217, 0.14);
  color: var(--text);
}

.breadcrumb-separator {
  color: var(--muted);
  font-weight: 850;
}

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

.folder-grid {
  margin-bottom: 16px;
}

.folder-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  width: 100%;
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
  padding: 1rem;
  text-align: left;
}

.folder-card:hover {
  border-color: rgba(54, 214, 217, 0.48);
  background: rgba(18, 25, 35, 0.96);
}

.folder-meta {
  display: grid;
  gap: 0.28rem;
}

.folder-name {
  overflow-wrap: anywhere;
  font-size: 1.04rem;
  font-weight: 850;
}

.folder-count {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.folder-description {
  color: #c6d0dc;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.38;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05070a;
  object-fit: contain;
}

.video-meta {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem;
}

.video-meta h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.video-description {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.42;
  margin-bottom: 0;
}

.video-category {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 850;
}

.video-link {
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 800;
}

.video-empty {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  margin: 0;
  padding: 1rem;
}

.hidden {
  display: none;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--line);
}

.contact-section h2 {
  max-width: 760px;
}

.contact-section p {
  max-width: 620px;
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 48px;
  }

  .hero-panel {
    align-self: start;
  }

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

  .contact-section {
    grid-template-columns: 1fr;
  }

  .folder-grid,
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
    padding: 14px 0;
  }

  .site-nav {
    justify-content: space-between;
    overflow-x: auto;
  }

  .hero {
    width: min(100% - 24px, var(--max-width));
    padding: 34px 0 48px;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.45rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .section {
    width: min(100% - 24px, var(--max-width));
    padding: 58px 0;
  }

  .project-grid,
  .capability-list {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 430px;
  }

  .folder-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    width: min(100% - 24px, var(--max-width));
    flex-direction: column;
  }
}
